user1255410
user1255410

Reputation: 886

Generating the outter convex polygon

I have the following set of points:

enter image description here

Basically, they're distinct points of many different rectangles. I'd love to merge them into a polygon like so, omitting the inner vertices:

enter image description here

I've tried generating a polygon with a simple sort by the angle to the center of the shape but failed miserably, as it appears I'd have to get rid of the inner not needed vertices first. Not sure where to go from here.

Upvotes: 0

Views: 59

Answers (1)

user1196549
user1196549

Reputation:

You can solve this by contour tracing, 4-connected neighborhood.

http://www.imageprocessingplace.com/downloads_V3/root_downloads/tutorials/contour_tracing_Abeer_George_Ghuneim/index.html

Upvotes: 1

Related Questions