Skip to content

fastNlMeansDenoisingColored

Computational photographyfunctionOpenCV 5.0.0
import { fastNlMeansDenoisingColored } from '@banou/opencv-wasm'

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

Modification of fastNlMeansDenoising function for colored images

fastNlMeansDenoisingColored(src: Mat, dst: Mat, h: number, hColor: number, templateWindowSize: number, searchWindowSize: number): void;
5 available overloads
fastNlMeansDenoisingColored(src: Mat, dst: Mat): void;
fastNlMeansDenoisingColored(src: Mat, dst: Mat, h: number): void;
fastNlMeansDenoisingColored(src: Mat, dst: Mat, h: number, hColor: number): void;
fastNlMeansDenoisingColored(src: Mat, dst: Mat, h: number, hColor: number, templateWindowSize: number): void;
fastNlMeansDenoisingColored(src: Mat, dst: Mat, h: number, hColor: number, templateWindowSize: number, searchWindowSize: number): void;
src

Input 8-bit 3-channel image.

dst

Output destination, filled by the native operation. Output image with the same size and type as src .

h

Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise

hColor

The same as h but for color components. For most images value equals 10 will be enough to remove colored noise and do not distort colors

The function converts image to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoising function.

templateWindowSize

Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels

searchWindowSize

Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels

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.