Ask Your Question
0

Fitting curved edges separated by sharp corners

asked 2018-05-29 12:30:39 -0600

My problem here is to detect points and fit separate curves to each of the curved edges of objects like what is shown below (The image shown is one example. The actual shape of each object is different, but there will be either a sharp corner or change in slope from one edge to another):

image description

One way to approach this is to separate out the points/pixels on each edge (the four lines in the above example) and fit polynomials on each of them. By searching a little bit, I learnt that Hough Transform is available for detecting straight edges on OpenCV, but not for curved edges. I also tried detecting contours, but it does not separate out edges of a closed shape. The main criterion for an edge to be considered separate from an adjacent one is that there is a sharp change in slope.

Could anyone give me ideas on how to achieve this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-05-30 08:13:53 -0600

You don't need Hough transform here. Just create the contour, trace all its points, and for each point calculate the angle between 2 segments of the polygon which meet at this point. If the angle is substantially less that 180 degrees, that's your separation point.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-29 12:30:39 -0600

Seen: 1,475 times

Last updated: May 30 '18