bilateralFilter function
BilateralFilter applies a bilateral filter to an image.
Bilateral filtering is described here: http:///www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html
BilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is very slow compared to most filters.
For further details, please see: https:///docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga9d7064d478c95d60003cf839430737ed
Implementation
Mat bilateralFilter(Mat src, int diameter, double sigmaColor, double sigmaSpace, {Mat? dst}) {
dst ??= Mat.empty();
cvRun(() => cffi.BilateralFilter(src.ref, dst!.ref, diameter, sigmaColor, sigmaSpace));
return dst;
}