Computer Science, Computer Vision, Image Processing, Machine Learning, Python.
We want to distinguish contours by whether they are external or internal. This is done, by setting the second argument in the ‘findContours()’ function to ‘RETR_CCOMP’. The function will now return an array of lists that describe the relationship of each contour with regards to other contours. One