fastNlMeansDenoising1
import { fastNlMeansDenoising1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations. Noise expected to be a gaussian white noise
fastNlMeansDenoising1(src: Mat, dst: Mat, h: FloatVector, templateWindowSize: number, searchWindowSize: number, normType: number): void;4 available overloads
fastNlMeansDenoising1(src: Mat, dst: Mat, h: FloatVector): void;fastNlMeansDenoising1(src: Mat, dst: Mat, h: FloatVector, templateWindowSize: number): void;fastNlMeansDenoising1(src: Mat, dst: Mat, h: FloatVector, templateWindowSize: number, searchWindowSize: number): void;fastNlMeansDenoising1(src: Mat, dst: Mat, h: FloatVector, templateWindowSize: number, searchWindowSize: number, normType: number): void;srcInput 8-bit or 16-bit (only with NORM_L1) 1-channel, 2-channel, 3-channel or 4-channel image.
dstOutput destination, filled by the native operation. Output image with the same size and type as src .
hArray of parameters regulating filter strength, either one parameter applied to all channels or one per channel in dst. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSizeSize in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSizeSize 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
normTypeType of norm used for weight calculation. Can be either NORM_L2 or NORM_L1
This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter.
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.