Skip to content

ximgproc_DisparityFilter

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

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

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

Main interface for all disparity map filters.

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.

filter

Apply filtering to the disparity map.

filter(disparity_map_left: Mat, left_view: Mat, filtered_disparity_map: Mat, disparity_map_right: Mat, ROI: Rect, right_view: Mat): void;
4 available overloads
filter(disparity_map_left: Mat, left_view: Mat, filtered_disparity_map: Mat): void;
filter(disparity_map_left: Mat, left_view: Mat, filtered_disparity_map: Mat, disparity_map_right: Mat): void;
filter(disparity_map_left: Mat, left_view: Mat, filtered_disparity_map: Mat, disparity_map_right: Mat, ROI: Rect): void;
filter(disparity_map_left: Mat, left_view: Mat, filtered_disparity_map: Mat, disparity_map_right: Mat, ROI: Rect, right_view: Mat): void;
disparity_map_left

disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map can have any resolution, it will be automatically resized to fit left_view resolution.

left_view

left view of the original stereo-pair to guide the filtering process, 8-bit single-channel or three-channel image.

filtered_disparity_map

Output destination, filled by the native operation. output disparity map, single-channel CV_16S type, with disparity values scaled by 16.

disparity_map_right

optional argument, some implementations might also use the disparity map of the right view to compute confidence maps. If provided, it must be a single-channel CV_16S matrix. Disparity values are expected to be scaled by 16 (one-pixel disparity corresponds to the value of 16).

ROI

region of the disparity map to filter. Optional, usually it should be set automatically.

right_view

optional argument, some implementations might also use the right view of the original stereo-pair.

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.