Ask Your Question
0

Can findContours returns strokes instead of oulines?

asked 2013-11-27 13:03:41 -0600

Phando gravatar image

Hey All, I am using findContours to generate cubic beziers. The problem I am having, is that after going through the Canny filter, findContours is returning the contours to outline each edge found. If there is a circle for instance, I will get two contours almost exactly on top of one another. I assume these two contours are the representation of the thickness of the line from the Canny filter.

Is there a way to use the hierarchy or adjust the findContours call to return a single contour per edge?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-11-27 23:47:42 -0600

Haris gravatar image

updated 2013-11-27 23:48:43 -0600

In findContours() function you need to use contour retrieval mode as CV_RETR_EXTERNAL which retrieves only the extreme outer contours. See findcontours Doc.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-11-27 13:03:41 -0600

Seen: 296 times

Last updated: Nov 27 '13