Table of Contents

Class GraphSegmentation

Namespace
Emgu.CV.XImgproc
Assembly
Emgu.CV.dll

Graph Based Segmentation Algorithm. The class implements the algorithm described in Pedro F Felzenszwalb and Daniel P Huttenlocher. Efficient graph-based image segmentation. volume 59, pages 167 - 181. Springer, 2004.

public class GraphSegmentation : UnmanagedObject, IDisposable
Inheritance
GraphSegmentation
Implements
Inherited Members

Constructors

GraphSegmentation(double, float, int)

Creates a graph based segmentor.

public GraphSegmentation(double sigma = 0.5, float k = 300, int minSize = 100)

Parameters

sigma double

The sigma parameter, used to smooth image

k float

The k parameter of the algorithm

minSize int

The minimum size of segments

Methods

DisposeObject()

Release the unmanaged memory associated with this object.

protected override void DisposeObject()

ProcessImage(IInputArray, IOutputArray)

Segment an image and store output in dst.

public void ProcessImage(IInputArray src, IOutputArray dst)

Parameters

src IInputArray

The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided

dst IOutputArray

The output segmentation. It's a CV_32SC1 Mat with the same number of cols and rows as input image, with an unique, sequential, id for each pixel.