findcontours() output doubt

asked 2015-11-21 09:37:35 -0600

arp1561 gravatar image
    image, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)

In this line i understand the meaning of image and contours. but what is hierarchy?? Could anyone explain?

Thanks in advance! :) P.S. I am a beginner.

edit retag flag offensive close merge delete

Comments

2

can you imagine a contour inside another contour ? and another one inside that ? like a matroshka doll ?

berak gravatar imageberak ( 2015-11-21 10:02:53 -0600 )edit
2

There are excellent tutorials about contours here in the docs

LorenaGdL gravatar imageLorenaGdL ( 2015-11-21 10:10:34 -0600 )edit

Please use the search button of both forum, google and the documentation. These questions can all be solved fairly easily using the available tools ...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-11-23 08:38:22 -0600 )edit