Table of Contents

Class SelectiveSearchSegmentation

Namespace
OpenCvSharp.XImgProc.Segmentation
Assembly
OpenCvSharp.dll

Selective search segmentation algorithm. The class implements the algorithm described in @cite uijlings2013selective.

public class SelectiveSearchSegmentation : Algorithm, IDisposable, ICvPtrHolder
Inheritance
SelectiveSearchSegmentation
Implements
Inherited Members

Constructors

SelectiveSearchSegmentation(nint)

Creates instance by raw pointer

protected SelectiveSearchSegmentation(nint p)

Parameters

p nint

Methods

AddGraphSegmentation(GraphSegmentation)

Add a new graph segmentation in the list of graph segmentations to process.

public virtual void AddGraphSegmentation(GraphSegmentation g)

Parameters

g GraphSegmentation

The graph segmentation

AddImage(InputArray)

Add a new image in the list of images to process.

public virtual void AddImage(InputArray img)

Parameters

img InputArray

The image

AddStrategy(SelectiveSearchSegmentationStrategy)

Add a new strategy in the list of strategy to process.

public virtual void AddStrategy(SelectiveSearchSegmentationStrategy s)

Parameters

s SelectiveSearchSegmentationStrategy

The strategy

ClearGraphSegmentations()

Clear the list of graph segmentations to process

public virtual void ClearGraphSegmentations()

ClearImages()

Clear the list of images to process

public virtual void ClearImages()

ClearStrategies()

Clear the list of strategy to process;

public virtual void ClearStrategies()

Create()

Create a new SelectiveSearchSegmentation class.

public static SelectiveSearchSegmentation Create()

Returns

SelectiveSearchSegmentation

DisposeManaged()

Releases managed resources

protected override void DisposeManaged()

Process(out Rect[])

Based on all images, graph segmentations and stragies, computes all possible rects and return them

public virtual void Process(out Rect[] rects)

Parameters

rects Rect[]

The list of rects. The first ones are more relevents than the lasts ones.

SetBaseImage(InputArray)

Set a image used by switch* functions to initialize the class

public virtual void SetBaseImage(InputArray img)

Parameters

img InputArray

The image

SwitchToSelectiveSearchFast(int, int, float)

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

public virtual void SwitchToSelectiveSearchFast(int baseK = 150, int incK = 150, float sigma = 0.8)

Parameters

baseK int

The k parameter for the first graph segmentation

incK int

The increment of the k parameter for all graph segmentations

sigma float

The sigma parameter for the graph segmentation

SwitchToSelectiveSearchQuality(int, int, float)

Initialize the class with the 'Selective search fast' parameters describled in @cite uijlings2013selective.

public virtual void SwitchToSelectiveSearchQuality(int baseK = 150, int incK = 150, float sigma = 0.8)

Parameters

baseK int

The k parameter for the first graph segmentation

incK int

The increment of the k parameter for all graph segmentations

sigma float

The sigma parameter for the graph segmentation

SwitchToSingleStrategy(int, float)

Initialize the class with the 'Single stragegy' parameters describled in @cite uijlings2013selective.

public virtual void SwitchToSingleStrategy(int k = 200, float sigma = 0.8)

Parameters

k int

The k parameter for the graph segmentation

sigma float

The sigma parameter for the graph segmentation