StereoBM
import { StereoBM } 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 StereoMatcher.
Class for computing stereo correspondence using the block matching algorithm, introduced and contributed to OpenCV by K. Konolige.
Constructors and members
static create
Creates StereoBM object
create(numDisparities: number, blockSize: number): StereoBM | null;3 available overloads
create(): StereoBM | null;create(numDisparities: number): StereoBM | null;create(numDisparities: number, blockSize: number): StereoBM | null;numDisparitiesthe disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.
blockSizethe linear size of the blocks compared by the algorithm. The size should be odd (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence.
The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for a specific stereo pair.
The StereoBM | null result.
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.
getPreFilterType
Return the pre filter type configured on this StereoBM object.
getPreFilterType(): number;The number result.
setPreFilterType
Set the pre filter type used by this StereoBM object.
setPreFilterType(preFilterType: number): void;preFilterTypepre filter type argument (number).
getPreFilterSize
Return the pre filter size configured on this StereoBM object.
getPreFilterSize(): number;The number result.
setPreFilterSize
Set the pre filter size used by this StereoBM object.
setPreFilterSize(preFilterSize: number): void;preFilterSizepre filter size argument (number).
getPreFilterCap
Return the pre filter cap configured on this StereoBM object.
getPreFilterCap(): number;The number result.
setPreFilterCap
Set the pre filter cap used by this StereoBM object.
setPreFilterCap(preFilterCap: number): void;preFilterCappre filter cap argument (number).
getTextureThreshold
Return the texture threshold configured on this StereoBM object.
getTextureThreshold(): number;The number result.
setTextureThreshold
Set the texture threshold used by this StereoBM object.
setTextureThreshold(textureThreshold: number): void;textureThresholdtexture threshold argument (number).
getUniquenessRatio
Return the uniqueness ratio configured on this StereoBM object.
getUniquenessRatio(): number;The number result.
setUniquenessRatio
Set the uniqueness ratio used by this StereoBM object.
setUniquenessRatio(uniquenessRatio: number): void;uniquenessRatiouniqueness ratio argument (number).
getSmallerBlockSize
Return the smaller block size configured on this StereoBM object.
getSmallerBlockSize(): number;The number result.
setSmallerBlockSize
Set the smaller block size used by this StereoBM object.
setSmallerBlockSize(blockSize: number): void;blockSizeblock size argument (number).
getROI1
Return the roi1 configured on this StereoBM object.
getROI1(): Rect;The Rect result.
setROI1
Set the roi1 used by this StereoBM object.
setROI1(roi1: Rect): void;roi1roi1 argument (Rect).
getROI2
Return the roi2 configured on this StereoBM object.
getROI2(): Rect;The Rect result.
setROI2
Set the roi2 used by this StereoBM object.
setROI2(roi2: Rect): void;roi2roi2 argument (Rect).
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.