Show / Hide Table of Contents

Class GraphSegmentation

Graph Based Segmentation Algorithm. The class implements the algorithm described in @cite PFF2004.

Inheritance
System.Object
DisposableObject
DisposableCvObject
Algorithm
GraphSegmentation
Implements
ICvPtrHolder
Inherited Members
Algorithm.Write(FileStorage)
Algorithm.Read(FileNode)
Algorithm.Empty
Algorithm.Save(String)
Algorithm.GetDefaultName()
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp.XImgProc.Segmentation
Assembly: OpenCvSharp.dll
Syntax
public class GraphSegmentation : Algorithm, ICvPtrHolder

Constructors

| Improve this Doc View Source

GraphSegmentation(IntPtr)

Creates instance by raw pointer

Declaration
protected GraphSegmentation(IntPtr p)
Parameters
Type Name Description
IntPtr p

Properties

| Improve this Doc View Source

K

Declaration
public virtual float K { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

MinSize

Declaration
public virtual int MinSize { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Sigma

Declaration
public virtual double Sigma { get; set; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

Create(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
| Improve this Doc View Source

DisposeManaged()

Releases managed resources

Declaration
protected override void DisposeManaged()
Overrides
DisposableObject.DisposeManaged()
| Improve this Doc View Source

DisposeUnmanaged()

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

Get()

Declaration
public override IntPtr Get()
Returns
Type Description
IntPtr
| Improve this Doc View Source

ProcessImage(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.

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX