Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You are trying to draw the hierarchy instead of the contours. The return of findContours is contours, hierarchy. Therefore, your line _, contours = cv2.findContours(edged,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE) should actually be contours, _ = cv2.findContours(edged,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE).
Hope it helps.