Skip to content

ximgproc_EdgeAwareInterpolator

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

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

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

Sparse match interpolation algorithm based on modified locally-weighted affine estimator from [Revaud2015] and Fast Global Smoother as post-processing filter.

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.

setCostMap

Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term. This implementation is based on a rather simple gradient-based edge map estimation. To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been used in the original publication) that may lead to improved accuracies, the internal edge map estimation can be bypassed here.

See: cv::ximgproc::createSuperpixelSLIC

setCostMap(_costMap: Mat): void;
_costMap

a type CV_32FC1 Mat is required.

setK

Parameter to tune the approximate size of the superpixel used for oversegmentation. See: cv::ximgproc::createSuperpixelSLIC K is a number of nearest-neighbor matches considered, when fitting a locally affine model. Usually it should be around 128. However, lower values would make the interpolation noticeably faster.

setK(_k: number): void;
_k

k argument (number).

getK

ximgproc_EdgeAwareInterpolator.getK: See: setK

getK(): number;
Returns

The number result.

setSigma

Sigma is a parameter defining how fast the weights decrease in the locally-weighted affine fitting. Higher values can help preserve fine details, lower values can help to get rid of noise in the output flow.

setSigma(_sigma: number): void;
_sigma

sigma argument (number).

getSigma

ximgproc_EdgeAwareInterpolator.getSigma: See: setSigma

getSigma(): number;
Returns

The number result.

setLambda

Lambda is a parameter defining the weight of the edge-aware term in geodesic distance, should be in the range of 0 to 1000.

setLambda(_lambda: number): void;
_lambda

lambda argument (number).

getLambda

ximgproc_EdgeAwareInterpolator.getLambda: See: setLambda

getLambda(): number;
Returns

The number result.

setUsePostProcessing

Sets whether the fastGlobalSmootherFilter() post-processing is employed. It is turned on by default.

setUsePostProcessing(_use_post_proc: boolean): void;
_use_post_proc

use post proc argument (boolean).

getUsePostProcessing

See: setUsePostProcessing

getUsePostProcessing(): boolean;
Returns

The boolean result.

setFGSLambda

Sets the respective fastGlobalSmootherFilter() parameter.

setFGSLambda(_lambda: number): void;
_lambda

lambda argument (number).

getFGSLambda

See: setFGSLambda

getFGSLambda(): number;
Returns

The number result.

setFGSSigma

See: setFGSLambda

setFGSSigma(_sigma: number): void;
_sigma

sigma argument (number).

getFGSSigma

See: setFGSLambda

getFGSSigma(): number;
Returns

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