convex_hull_object
-
skimage.morphology.convex_hull_object(image, neighbors=8)
[source] -
Compute the convex hull image of individual objects in a binary image.
The convex hull is the set of pixels included in the smallest convex polygon that surround all white pixels in the input image.
Parameters: image : (M, N) array
Binary input image.
neighbors : {4, 8}, int
Whether to use 4- or 8-connectivity.
Returns: hull : ndarray of bool
Binary image with pixels in convex hull set to True.
Notes
This function uses skimage.morphology.label to define unique objects, finds the convex hull of each using convex_hull_image, and combines these regions with logical OR. Be aware the convex hulls of unconnected objects may overlap in the result. If this is suspected, consider using convex_hull_image separately on each object.
Please login to continue.