Skip to content

ximgproc_dtFilter

Extended image processingfunctionOpenCV 5.0.0
import { ximgproc_dtFilter } from '@banou/opencv-wasm'

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

ARGUMENTSguide, src, dst, sigmaSpatial
FUNCTIONximgproc_dtFilter
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Simple one-line Domain Transform filter call. If you have multiple images to filter with the same guided image then use DTFilter interface to avoid extra computations on initialization stage.

See: bilateralFilter, guidedFilter, amFilter

ximgproc_dtFilter(guide: Mat, src: Mat, dst: Mat, sigmaSpatial: number, sigmaColor: number, mode: number, numIters: number): void;
3 available overloads
ximgproc_dtFilter(guide: Mat, src: Mat, dst: Mat, sigmaSpatial: number, sigmaColor: number): void;
ximgproc_dtFilter(guide: Mat, src: Mat, dst: Mat, sigmaSpatial: number, sigmaColor: number, mode: number): void;
ximgproc_dtFilter(guide: Mat, src: Mat, dst: Mat, sigmaSpatial: number, sigmaColor: number, mode: number, numIters: number): void;
guide

guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.

src

filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.

dst

Output destination, filled by the native operation. destination image

sigmaSpatial

{\sigma}_H parameter in the original article, it's similar to the sigma in the coordinate space into bilateralFilter.

sigmaColor

{\sigma}_r parameter in the original article, it's similar to the sigma in the color space into bilateralFilter.

mode

one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for filtering 2D signals in the article.

numIters

optional number of iterations used for filtering, 3 is quite enough.

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.