skimage 0.17.2

ParametersReturns
convex_hull_image(image, offset_coordinates=True, tolerance=1e-10)

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 : array

Binary input image. This array is cast to bool before processing.

offset_coordinates : bool, optional

If True , a pixel at coordinate, e.g., (4, 7) will be represented by coordinates (3.5, 7), (4.5, 7), (4, 6.5), and (4, 7.5). This adds some "extent" to a pixel when computing the hull.

tolerance : float, optional

Tolerance when determining whether a point is inside the hull. Due to numerical floating point errors, a tolerance of 0 can result in some points erroneously being classified as being outside the hull.

Returns

hull : (M, N) array of bool

Binary image with pixels in convex hull set to True.

Compute the convex hull image of a binary image.

Examples

See :

Local connectivity graph

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


File: /skimage/morphology/convex_hull.py#21
type: <class 'function'>
Commit: