Hi to all,
My aim is to classify contours which have no children and any parent. I found my contours with "CV_RETR_TREE" hierarchy. To classify, I just determined if statement as
if ( hierarchy[i][3] == -1 && hierarchy[i][2]==-1)
However it could not classify the contours I wanted. The source image I implemented findcontours function is ;
As you can see there is no any child or parent in this contour, however I cheched its hierarchy and this is the result:
[121, 76, 119, -1]
It finds it's child while there is not as I can see.
What do you think the problem might be?
Thank you!