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.
Binary input image. This array is cast to bool before processing.
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 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.
Binary image with pixels in convex hull set to True.
Compute the convex hull image of 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