ximgproc_segmentation_SelectiveSearchSegmentation
import { ximgproc_segmentation_SelectiveSearchSegmentation } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;The this result.
setBaseImage
Set a image used by switch* functions to initialize the class
setBaseImage(img: Mat): void;imgThe 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;kThe k parameter for the graph segmentation
sigmaThe 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_kThe k parameter for the first graph segmentation
inc_kThe increment of the k parameter for all graph segmentations
sigmaThe 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_kThe k parameter for the first graph segmentation
inc_kThe increment of the k parameter for all graph segmentations
sigmaThe sigma parameter for the graph segmentation
addImage
Add a new image in the list of images to process.
addImage(img: Mat): void;imgThe 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;gThe 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;sThe 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;rectsOutput 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.