Table of Contents

Class SelectiveSearchSegmentationStrategyMultiple

Namespace
OpenCvSharp.XImgProc.Segmentation
Assembly
OpenCvSharp.dll

Base class for high-level OpenCV algorithms

public class SelectiveSearchSegmentationStrategyMultiple : SelectiveSearchSegmentationStrategy, IDisposable, ICvPtrHolder
Inheritance
SelectiveSearchSegmentationStrategyMultiple
Implements
Inherited Members

Constructors

SelectiveSearchSegmentationStrategyMultiple(nint)

Creates instance by raw pointer

protected SelectiveSearchSegmentationStrategyMultiple(nint p)

Parameters

p nint

Methods

Create()

Create a new multiple strategy

public static SelectiveSearchSegmentationStrategyMultiple Create()

Returns

SelectiveSearchSegmentationStrategyMultiple

Create(SelectiveSearchSegmentationStrategy)

Create a new multiple strategy and set one subtrategy

public static SelectiveSearchSegmentationStrategyMultiple Create(SelectiveSearchSegmentationStrategy s1)

Parameters

s1 SelectiveSearchSegmentationStrategy

The first strategy

Returns

SelectiveSearchSegmentationStrategyMultiple

Create(SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy)

Create a new multiple strategy and set one subtrategy

public static SelectiveSearchSegmentationStrategyMultiple Create(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2)

Parameters

s1 SelectiveSearchSegmentationStrategy

The first strategy

s2 SelectiveSearchSegmentationStrategy

The second strategy

Returns

SelectiveSearchSegmentationStrategyMultiple

Create(SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy)

Create a new multiple strategy and set one subtrategy

public static SelectiveSearchSegmentationStrategyMultiple Create(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2, SelectiveSearchSegmentationStrategy s3)

Parameters

s1 SelectiveSearchSegmentationStrategy

The first strategy

s2 SelectiveSearchSegmentationStrategy

The second strategy

s3 SelectiveSearchSegmentationStrategy

The third strategy

Returns

SelectiveSearchSegmentationStrategyMultiple

Create(SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy, SelectiveSearchSegmentationStrategy)

Create a new multiple strategy and set one subtrategy

public static SelectiveSearchSegmentationStrategyMultiple Create(SelectiveSearchSegmentationStrategy s1, SelectiveSearchSegmentationStrategy s2, SelectiveSearchSegmentationStrategy s3, SelectiveSearchSegmentationStrategy s4)

Parameters

s1 SelectiveSearchSegmentationStrategy

The first strategy

s2 SelectiveSearchSegmentationStrategy

The second strategy

s3 SelectiveSearchSegmentationStrategy

The third strategy

s4 SelectiveSearchSegmentationStrategy

The forth strategy

Returns

SelectiveSearchSegmentationStrategyMultiple

Get(int, int)

Return the score between two regions (between 0 and 1)

[SuppressMessage("Microsoft.Design", "CA1716: Identifiers should not match keywords")]
public virtual float Get(int r1, int r2)

Parameters

r1 int

The first region

r2 int

The second region

Returns

float

Merge(int, int)

Inform the strategy that two regions will be merged

public virtual void Merge(int r1, int r2)

Parameters

r1 int

The first region

r2 int

The second region

SetImage(InputArray, InputArray, InputArray, int)

Set a initial image, with a segementation.

public virtual void SetImage(InputArray img, InputArray regions, InputArray sizes, int imageId = -1)

Parameters

img InputArray

The input image. Any number of channel can be provided

regions InputArray

A segementation of the image. The parameter must be the same size of img.

sizes InputArray

The sizes of different regions

imageId int

If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same.