bilateralFilterAsync function

Future<Mat> bilateralFilterAsync(
  1. Mat src,
  2. int diameter,
  3. double sigmaColor,
  4. double sigmaSpace, {
  5. Mat? dst,
})

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

Future<Mat> bilateralFilterAsync(
  Mat src,
  int diameter,
  double sigmaColor,
  double sigmaSpace, {
  Mat? dst,
}) async {
  dst ??= Mat.empty();
  return cvRunAsync0(
    (callback) => cimgproc.cv_bilateralFilter(src.ref, dst!.ref, diameter, sigmaColor, sigmaSpace, callback),
    (c) {
      return c.complete(dst);
    },
  );
}