ximgproc_createFastGlobalSmootherFilter
import { ximgproc_createFastGlobalSmootherFilter } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
ximgproc_createFastGlobalSmootherFilter(guide: Mat, lambda: number, sigma_color: number, lambda_attenuation: number, num_iter: number): ximgproc_FastGlobalSmootherFilter | null;3 available overloads
ximgproc_createFastGlobalSmootherFilter(guide: Mat, lambda: number, sigma_color: number): ximgproc_FastGlobalSmootherFilter | null;ximgproc_createFastGlobalSmootherFilter(guide: Mat, lambda: number, sigma_color: number, lambda_attenuation: number): ximgproc_FastGlobalSmootherFilter | null;ximgproc_createFastGlobalSmootherFilter(guide: Mat, lambda: number, sigma_color: number, lambda_attenuation: number, num_iter: number): ximgproc_FastGlobalSmootherFilter | null;guideimage serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
lambdaparameter defining the amount of regularization
sigma_colorparameter, that is similar to color space sigma in bilateralFilter.
lambda_attenuationinternal parameter, defining how much lambda decreases after each iteration. Normally, it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
num_iternumber of iterations used for filtering, 3 is usually enough.
For more details about Fast Global Smoother parameters, see the original paper [Min2014]. However, please note that there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors propose to dynamically update the guide image after each iteration. To maximize the performance this feature was not implemented here.
The ximgproc_FastGlobalSmootherFilter | null result.
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.