OpenCV: Get only black contours in a binary image with findContours
问题 I am new to OpenCV, so please bear with me. Currently, I get contours of both white and black things in my binary image. I only want black contours though (so where the value is 0). Is there some kind of setting I can adjust to get this result? Or can I filter them? Also: cv.findContours() does return both the contours and a hierarchy. What is hierarchy used for? And lastsly: Contours seemingly consist of an array with multiple coordinates. What do they mean? 回答1: cv2.findContours finds all