convex_hull_object(image, neighbors=None, *, connectivity=None)
The convex hull is the set of pixels included in the smallest convex polygon that surround all white pixels in the input image.
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
.
Binary input image.
Whether to use 4 or 8 adjacent pixels as neighbors. If None
, set to 8. Deprecated, use connectivity
instead.
Determines the neighbors of each pixel. Adjacent elements within a squared distance of connectivity
from pixel center are considered neighbors. If None
, set to 2:
1-connectivity 2-connectivity [ ] [ ] [ ] [ ] | \ | / [ ]--[x]--[ ] [ ]--[x]--[ ] | / | \ [ ] [ ] [ ] [ ]
Binary image with pixels inside convex hull set to True
.
Compute the convex hull image of individual objects in a binary image.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them