Skip to content

ximgproc_DisparityWLSFilter

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

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

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

Disparity map filter based on Weighted Least Squares filter (in form of Fast Global Smoother that is a lot faster than traditional Weighted Least Squares filter implementations) and optional use of left-right-consistency-based confidence to refine the results in half-occlusions and uniform areas.

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.

getLambda

filter parameters Lambda is a parameter defining the amount of regularization during filtering. Larger values force filtered disparity map edges to adhere more to source image edges. Typical value is 8000.

getLambda(): number;
Returns

The number result.

setLambda

ximgproc_DisparityWLSFilter.setLambda: See: getLambda

setLambda(_lambda: number): void;
_lambda

lambda argument (number).

getSigmaColor

SigmaColor is a parameter defining how sensitive the filtering process is to source image edges. Large values can lead to disparity leakage through low-contrast edges. Small values can make the filter too sensitive to noise and textures in the source image. Typical values range from 0.8 to 2.0.

getSigmaColor(): number;
Returns

The number result.

setSigmaColor

See: getSigmaColor

setSigmaColor(_sigma_color: number): void;
_sigma_color

sigma color argument (number).

getLRCthresh

confidence-related parameters LRCthresh is a threshold of disparity difference used in left-right-consistency check during confidence map computation. The default value of 24 (1.5 pixels) is virtually always good enough.

getLRCthresh(): number;
Returns

The number result.

setLRCthresh

See: getLRCthresh

setLRCthresh(_LRC_thresh: number): void;
_LRC_thresh

lrc thresh argument (number).

getDepthDiscontinuityRadius

DepthDiscontinuityRadius is a parameter used in confidence computation. It defines the size of low-confidence regions around depth discontinuities.

getDepthDiscontinuityRadius(): number;
Returns

The number result.

setDepthDiscontinuityRadius

See: getDepthDiscontinuityRadius

setDepthDiscontinuityRadius(_disc_radius: number): void;
_disc_radius

disc radius argument (number).

getConfidenceMap

Get the confidence map that was used in the last filter call. It is a CV_32F one-channel image with values ranging from 0.0 (totally untrusted regions of the raw disparity map) to 255.0 (regions containing correct disparity values with a high degree of confidence).

getConfidenceMap(): Mat;
Returns

The Mat result. Release returned native handles with using or delete(), including handles nested in results.

getROI

Get the ROI used in the last filter call

getROI(): Rect;
Returns

The Rect 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.