skimage 0.17.2

NotesParametersReturnsBackRef
felzenszwalb(image, scale=1, sigma=0.8, min_size=20, multichannel=True)

Produces an oversegmentation of a multichannel (i.e. RGB) image using a fast, minimum spanning tree based clustering on the image grid. The parameter scale sets an observation level. Higher scale means less and larger segments. sigma is the diameter of a Gaussian kernel, used for smoothing the image prior to segmentation.

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.

For RGB images, the algorithm uses the euclidean distance between pixels in color space.

Notes

The k parameter used in the original paper renamed to :None:None:`scale` here.

Parameters

image : (width, height, 3) or (width, height) ndarray

Input image.

scale : float

Free parameter. Higher means larger clusters.

sigma : float

Width (standard deviation) of Gaussian kernel used in preprocessing.

min_size : int

Minimum component size. Enforced using postprocessing.

multichannel : bool, optional (default: True)

Whether the last axis of the image is to be interpreted as multiple channels. A value of False, for a 3D image, is not currently supported.

Returns

segment_mask : (width, height) ndarray

Integer mask indicating segment labels.

Computes Felsenszwalb's efficient graph based image segmentation.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage.segmentation import felzenszwalb
... from skimage.data import coffee
... img = coffee()
... segments = felzenszwalb(img, scale=3.0, sigma=0.95, min_size=5)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.segmentation._felzenszwalb.felzenszwalb

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/segmentation/_felzenszwalb.py#6
type: <class 'function'>
Commit: