Skip to content

StereoBM_create

stereofunctionOpenCV 5.0.0
import { StereoBM_create } from '@banou/opencv-wasm'

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

ARGUMENTSnumDisparities, blockSize
FUNCTIONStereoBM_create
RETURN TYPEStereoBM | null
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Creates StereoBM object

StereoBM_create(numDisparities: number, blockSize: number): StereoBM | null;
3 available overloads
StereoBM_create(): StereoBM | null;
StereoBM_create(numDisparities: number): StereoBM | null;
StereoBM_create(numDisparities: number, blockSize: number): StereoBM | null;
numDisparities

the 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.

blockSize

the 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.

Returns

The StereoBM | null result.

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.