Image.labels_graphseg#

Image.labels_graphseg(sigma: float = 0.5, k: int = 2000, minsize: int = 100) tuple[Any, int][source]#

Blob labelling using graph-based segmentation

Parameters:

kwargs – arguments passed to MSER_create

Returns:

label image, number of regions

Return type:

Image, int

Compute labels of connected components in the input color image. Regions are sets of contiguous pixels that are similar with respect to their surrounds.

The method returns the label image and the number of labels N, so labels lie in the range [0, N-1].The value in the label image in an integer indicating which region the corresponding input pixel belongs to. The background has label 0.

References:
Seealso:

labels_binary labels_MSER blobs opencv.createGraphSegmentation