Skip to content

StereoMatcher

stereoclassOpenCV 5.0.0
import { StereoMatcher } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSStereoMatcher
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.

namespace fisheye The base class for stereo correspondence algorithms.

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.

compute

Computes disparity map for the specified stereo pair

compute(left: Mat, right: Mat, disparity: Mat): void;
left

Left 8-bit single-channel image.

right

Right image of the same size and the same type as the left one.

disparity

Output destination, filled by the native operation. Output disparity map. It has the same size as the input images. Some algorithms, like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.

getMinDisparity

Return the min disparity configured on this StereoMatcher object.

getMinDisparity(): number;
Returns

The number result.

setMinDisparity

Set the min disparity used by this StereoMatcher object.

setMinDisparity(minDisparity: number): void;
minDisparity

min disparity argument (number).

getNumDisparities

Return the num disparities configured on this StereoMatcher object.

getNumDisparities(): number;
Returns

The number result.

setNumDisparities

Set the num disparities used by this StereoMatcher object.

setNumDisparities(numDisparities: number): void;
numDisparities

num disparities argument (number).

getBlockSize

Return the block size configured on this StereoMatcher object.

getBlockSize(): number;
Returns

The number result.

setBlockSize

Set the block size used by this StereoMatcher object.

setBlockSize(blockSize: number): void;
blockSize

block size argument (number).

getSpeckleWindowSize

Return the speckle window size configured on this StereoMatcher object.

getSpeckleWindowSize(): number;
Returns

The number result.

setSpeckleWindowSize

Set the speckle window size used by this StereoMatcher object.

setSpeckleWindowSize(speckleWindowSize: number): void;
speckleWindowSize

speckle window size argument (number).

getSpeckleRange

Return the speckle range configured on this StereoMatcher object.

getSpeckleRange(): number;
Returns

The number result.

setSpeckleRange

Set the speckle range used by this StereoMatcher object.

setSpeckleRange(speckleRange: number): void;
speckleRange

speckle range argument (number).

getDisp12MaxDiff

Return the disp12 max diff configured on this StereoMatcher object.

getDisp12MaxDiff(): number;
Returns

The number result.

setDisp12MaxDiff

Set the disp12 max diff used by this StereoMatcher object.

setDisp12MaxDiff(disp12MaxDiff: number): void;
disp12MaxDiff

disp12 max diff argument (number).

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.