skimage 0.17.2

ParametersReturns

Produces an oversegmentation of a single or multi-channel image using a fast, minimum spanning tree based clustering on the image grid. The number of produced segments as well as their size can only be controlled indirectly through scale . Segment size within an image can vary greatly depending on local contrast.

Parameters

image : (N, M, C) ndarray

Input image.

scale : float, optional (default 1)

Sets the obervation level. Higher means larger clusters.

sigma : float, optional (default 0.8)

Width of Gaussian smoothing kernel used in preprocessing. Larger sigma gives smother segment boundaries.

min_size : int, optional (default 20)

Minimum component size. Enforced using postprocessing.

Returns

segment_mask : (N, M) ndarray

Integer mask indicating segment labels.

Felzenszwalb's efficient graph based segmentation for single or multiple channels.

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: None#None
type: <class 'builtin_function_or_method'>
Commit: