nContours

xripl.contour.nContours(contours, n)[source]

Get the n longest contours from a list of contours.

contours: list

A list of contours from skimage.measure.find_contours().

n: int

Number of contours to select.