Drawing contours from label_image
问题 I have a label_image array and I am deriving the outlines/boundaries of the objects on that array. Currently I am doing that by getting all unique labels, iterating over them and then find the contours of each object. Like in the loop below, where I am populating a dict with keys the label and values the contours import cv2 import pandas as pd import numpy as np def extract_borders(label_image): labels = np.unique(label_image[label_image > 0]) d = {} for label in labels: y = label_image ==