The contours package exposes Matplotlib's contour generators to the user providing an equivalent of MATLAB's contourc function. This is done for grids (including curvilinear) as well as unstructured ...
I was myself facing the need of a function that could compute the contours of an image and give me the polygones without the need to make an actual figure and extract the curves from the contour ...