Hi,
Thank you for implementing the algorithm in python.
I'm trying to use it on contours from a binary mask. The contours are returned from cv2.findContours, and I would like to compute the visual center for every contour. However, cx, cy = polylabel(cnt.tolist()) always returns a point that is on the edge of the contour, not in the middle (the .tolist() might not be required). Would you have any hint if I'm using polylabel correctly?
Many thanks.
Hi,
Thank you for implementing the algorithm in python.
I'm trying to use it on contours from a binary mask. The contours are returned from cv2.findContours, and I would like to compute the visual center for every contour. However,
cx, cy = polylabel(cnt.tolist())always returns a point that is on the edge of the contour, not in the middle (the .tolist() might not be required). Would you have any hint if I'm using polylabel correctly?Many thanks.