xphoto_bm3dDenoising1
import { xphoto_bm3dDenoising1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Performs image denoising using the Block-Matching and 3D-filtering algorithm http://www.cs.tut.fi/~foi/GCF-BM3D/BM3D_TIP_2007.pdf with several computational optimizations. Noise expected to be a gaussian white noise.
See: fastNlMeansDenoising
xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number, beta: number, normType: number, step: number, transformType: number): void;12 available overloads
xphoto_bm3dDenoising1(src: Mat, dst: Mat): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number, beta: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number, beta: number, normType: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number, beta: number, normType: number, step: number): void;xphoto_bm3dDenoising1(src: Mat, dst: Mat, h: number, templateWindowSize: number, searchWindowSize: number, blockMatchingStep1: number, blockMatchingStep2: number, groupSize: number, slidingStep: number, beta: number, normType: number, step: number, transformType: number): void;srcInput 8-bit or 16-bit 1-channel image.
dstOutput destination, filled by the native operation. Output image with the same size and type as src.
hParameter regulating filter strength. 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 for block-matching. Should be power of 2.
searchWindowSizeSize in pixels of the window that is used to perform block-matching. Affect performance linearly: greater searchWindowsSize - greater denoising time. Must be larger than templateWindowSize.
blockMatchingStep1Block matching threshold for the first step of BM3D (hard thresholding), i.e. maximum distance for which two blocks are considered similar. Value expressed in euclidean distance.
blockMatchingStep2Block matching threshold for the second step of BM3D (Wiener filtering), i.e. maximum distance for which two blocks are considered similar. Value expressed in euclidean distance.
groupSizeMaximum size of the 3D group for collaborative filtering.
slidingStepSliding step to process every next reference block.
betaKaiser window parameter that affects the sidelobe attenuation of the transform of the window. Kaiser window is used in order to reduce border effects. To prevent usage of the window, set beta to zero.
normTypeNorm used to calculate distance between blocks. L2 is slower than L1 but yields more accurate results.
stepStep of BM3D to be executed. Allowed are only BM3D_STEP1 and BM3D_STEPALL. BM3D_STEP2 is not allowed as it requires basic estimate to be present.
transformTypeType of the orthogonal transform used in collaborative filtering step. Currently only Haar transform is supported.
This function expected to be applied to grayscale images. Advanced usage of this function can be manual denoising of colored image in different colorspaces.
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.