Class GraphSegmentation
Graph Based Segmentation Algorithm. The class implements the algorithm described in @cite PFF2004.
Implements
Inherited Members
Namespace: OpenCvSharp.XImgProc.Segmentation
Assembly: OpenCvSharp.dll
Syntax
public class GraphSegmentation : Algorithm, ICvPtrHolder
Constructors
| Improve this Doc View SourceGraphSegmentation(IntPtr)
Creates instance by raw pointer
Declaration
protected GraphSegmentation(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | p |
Properties
| Improve this Doc View SourceK
Declaration
public virtual float K { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
MinSize
Declaration
public virtual int MinSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Sigma
Declaration
public virtual double Sigma { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceCreate(Double, Single, Int32)
Creates a graph based segmentor
Declaration
public static GraphSegmentation Create(double sigma = 0.5, float k = 300F, int minSize = 100)
Parameters
Type | Name | Description |
---|---|---|
System.Double | sigma | The sigma parameter, used to smooth image |
System.Single | k | The k parameter of the algorithm |
System.Int32 | minSize | The minimum size of segments |
Returns
Type | Description |
---|---|
GraphSegmentation |
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
| Improve this Doc View SourceProcessImage(InputArray, OutputArray)
Segment an image and store output in dst
Declaration
public virtual void ProcessImage(InputArray src, OutputArray dst)
Parameters
Type | Name | Description |
---|---|---|
InputArray | src | The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided |
OutputArray | dst | 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. |