Closed justin-segler closed 6 years ago
Were you able to solve this? Also looking to get the hierarchy from findContours...
OK, so you CAN pass integer vals for mode and chain, modes:
CV_RETR_EXTERNAL =0, CV_RETR_LIST =1, CV_RETR_CCOMP =2, CV_RETR_TREE =3, CV_RETR_FLOODFILL =4
I noticed that the mode and chain args inside of findContours are hardcoded to be CV_RETR_LIST and CV_CHAIN_APPROX_SIMPLE. However, when the mode is changed to CV_RETR_CCOMP (which should return the hierarchy with sibling and parent-child relationships), it is not returning the full hierarchy.
1) Why is the mode and chain hardcoded? These should be arguments to the findContours function. 2) Why is CV_RETR_CCOMP returning the same hierarchy output as CV_RETR_LIST?