Skip to content

ximgproc_weightedMedianFilter

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

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

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

Applies weighted median filter to an image.

For more details about this implementation, please see [zhang2014100]+

See: medianBlur, jointBilateralFilter

ximgproc_weightedMedianFilter(joint: Mat, src: Mat, dst: Mat, r: number, sigma: number, weightType: number, mask: Mat): void;
4 available overloads
ximgproc_weightedMedianFilter(joint: Mat, src: Mat, dst: Mat, r: number): void;
ximgproc_weightedMedianFilter(joint: Mat, src: Mat, dst: Mat, r: number, sigma: number): void;
ximgproc_weightedMedianFilter(joint: Mat, src: Mat, dst: Mat, r: number, sigma: number, weightType: number): void;
ximgproc_weightedMedianFilter(joint: Mat, src: Mat, dst: Mat, r: number, sigma: number, weightType: number, mask: Mat): void;
joint

Joint 8-bit, 1-channel or 3-channel image.

src

Source 8-bit or floating-point, 1-channel or 3-channel image.

dst

Output destination, filled by the native operation. Destination image.

r

Radius of filtering kernel, should be a positive integer.

sigma

Filter range standard deviation for the joint image.

weightType

weightType The type of weight definition, see WMFWeightType

mask

A 0-1 mask that has the same size with I. This mask is used to ignore the effect of some pixels. If the pixel value on mask is 0, the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.

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.