Find number of close loops in Binary Edge Image
问题 I have a binary image with the number of close loops and free curves like shown in image.. My approach so far- (python code): Skeletonize the image to get edge of 1 pixel Use label/bwlabel to get individual curve/edge Applied DFS to get the edge which is not close Apply DFS to get close edge..but not working correctly.. Expected output - Number of close loops =6, the sum of the pixels along the loop or all (x,y) points along the edge of the close curve as highlighted in RED Expected Output-