bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / morphology / convex_hull / convex_hull_object
function
skimage.morphology.convex_hull:convex_hull_object
source: /dev/scikit-image/src/skimage/morphology/convex_hull.py :173
Signature
def convex_hull_object ( image , * , connectivity = 2 ) Summary
Compute the convex hull image of individual objects in a binary image.
Extended Summary
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: ndarray of shape (M, N)Binary input image.
connectivity: {1, 2}, int, optionalDetermines the neighbors of each pixel. Adjacent elements within a squared distance of
connectivityfrom pixel center are considered neighbors.1-connectivity 2-connectivity [ ] [ ] [ ] [ ] | \ | / [ ]--[x]--[ ] [ ]--[x]--[ ] | / | \ [ ] [ ] [ ] [ ]
Returns
hull: ndarray of boolBinary image with pixels inside 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 or adjust connectivity.
Aliases
-
skimage.morphology.convex_hull_object