Class GraphSegmentation
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
doubleThe sigma parameter, used to smooth image
k
floatThe k parameter of the algorithm
minSize
intThe 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
IInputArrayThe input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided
dst
IOutputArrayThe 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.