import cv2 from skimage import measure # read the segmentation image segmentation_path = "" segmentation = cv2.imread(segmentation_path) # apply get centroids and area function # try to label the coordinates # try to save the coordinates to a csv file