Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your code does not make any sense.

if cv2.RETR_EXTERNALis used, you get a flat list of contours, and hierarchy is simply None. IF you would have used cv2.RETR_TREE, you would need to recursively traverse the hierarchy, your zip() attempt does not make any sense here.

also, trying a simple help(itertools.repeat) before asking would have pointed you at the problem already.

please have a look at the tutorials