Create mask from skimage contour
问题 I have an image that I found contours on with skimage.measure.find_contours() but now I want to create a mask for the pixels fully outside the largest closed contour. Any idea how to do this? Modifying the example in the documentation: import numpy as np import matplotlib.pyplot as plt from skimage import measure # Construct some test data x, y = np.ogrid[-np.pi:np.pi:100j, -np.pi:np.pi:100j] r = np.sin(np.exp((np.sin(x)**2 + np.cos(y)**2))) # Find contours at a constant value of 0.8 contours