machinevisiontoolbox.Image.labels_graphseg

Image.labels_graphseg(sigma=0.5, k=2000, minsize=100)

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:
  • Efficient graph-based image segmentation, Pedro F Felzenszwalb and Daniel P Huttenlocher, volume 59, pages 167–181. Springer, 2004.

  • Robotics, Vision & Control for Python, Section 12.1.2.2, P. Corke, Springer 2023.

Seealso:

labels_binary labels_MSER blobs opencv.createGraphSegmentation