Skip to content

ximgproc_segmentation_SelectiveSearchSegmentation

Extended image processingclassOpenCV 5.0.0
import { ximgproc_segmentation_SelectiveSearchSegmentation } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSximgproc_segmentation_SelectiveSearchSegmentation
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.

Selective search segmentation algorithm The class implements the algorithm described in [uijlings2013selective].

Constructors and members

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

setBaseImage

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

setBaseImage(img: Mat): void;
img

The image

switchToSingleStrategy

Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective].

switchToSingleStrategy(k: number, sigma: number): void;
3 available overloads
switchToSingleStrategy(): void;
switchToSingleStrategy(k: number): void;
switchToSingleStrategy(k: number, sigma: number): void;
k

The k parameter for the graph segmentation

sigma

The sigma parameter for the graph segmentation

switchToSelectiveSearchFast

Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective].

switchToSelectiveSearchFast(base_k: number, inc_k: number, sigma: number): void;
4 available overloads
switchToSelectiveSearchFast(): void;
switchToSelectiveSearchFast(base_k: number): void;
switchToSelectiveSearchFast(base_k: number, inc_k: number): void;
switchToSelectiveSearchFast(base_k: number, inc_k: number, sigma: number): void;
base_k

The k parameter for the first graph segmentation

inc_k

The increment of the k parameter for all graph segmentations

sigma

The sigma parameter for the graph segmentation

switchToSelectiveSearchQuality

Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective].

switchToSelectiveSearchQuality(base_k: number, inc_k: number, sigma: number): void;
4 available overloads
switchToSelectiveSearchQuality(): void;
switchToSelectiveSearchQuality(base_k: number): void;
switchToSelectiveSearchQuality(base_k: number, inc_k: number): void;
switchToSelectiveSearchQuality(base_k: number, inc_k: number, sigma: number): void;
base_k

The k parameter for the first graph segmentation

inc_k

The increment of the k parameter for all graph segmentations

sigma

The sigma parameter for the graph segmentation

addImage

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

addImage(img: Mat): void;
img

The image

clearImages

Clear the list of images to process

clearImages(): void;

addGraphSegmentation

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

addGraphSegmentation(g: ximgproc_segmentation_GraphSegmentation | null): void;
g

The graph segmentation

clearGraphSegmentations

Clear the list of graph segmentations to process;

clearGraphSegmentations(): void;

addStrategy

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

addStrategy(s: ximgproc_segmentation_SelectiveSearchSegmentationStrategy | null): void;
s

The strategy

clearStrategies

Clear the list of strategy to process;

clearStrategies(): void;

process

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

process(rects: RectVector): void;
rects

Output destination, filled by the native operation. The list of rects. The first ones are more relevents than the lasts ones.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.