Ask Your Question

Does findcontour detect the contour is not closed?

asked 2014-05-11 11:22:55 -0500

wuling gravatar image

updated 2014-05-11 11:32:26 -0500

Hi all, I have a question about the findcontours, if i use canny or other line detect methods.Then i use findcontours to detect all shape contours.How to recognize the contours is closed or not??? If not, how to omit those?

edit retag flag offensive close merge delete



See the answer here.

Haris gravatar imageHaris ( 2014-05-11 22:38:45 -0500 )edit

Dear Haris,thank your explanation in detial.

wuling gravatar imagewuling ( 2014-05-12 11:33:35 -0500 )edit

You are welcome......:)

Haris gravatar imageHaris ( 2014-05-12 22:34:20 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-13 09:38:15 -0500

wuling gravatar image

Dear Haris: I have the other question,the image like this: image description

If i don't use fill hole and erode. Is it possible to use findcontours to detect cycle?

edit flag offensive delete link more


You might see Contours Hierarchy, well explained here, also from next time please edit your question instead of using answer section.

Haris gravatar imageHaris ( 2014-05-13 22:50:09 -0500 )edit

Thanks very much

wuling gravatar imagewuling ( 2014-05-13 22:58:05 -0500 )edit

Question Tools


Asked: 2014-05-11 11:22:55 -0500

Seen: 5,400 times

Last updated: May 13 '14