edgePreservingFilterAsync static method

Future<Mat> edgePreservingFilterAsync(
  1. InputArray src,
  2. int d,
  3. double threshold, {
  4. OutputArray? dst,
})

Smoothes an image using the Edge-Preserving filter.

The function smoothes Gaussian noise as well as salt & pepper noise. For more details about this implementation, please see ReiWoe18 Reich, S. and Wörgötter, F. and Dellen, B. (2018). A Real-Time Edge-Preserving Denoising Filter. Proceedings of the 13th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP): Visapp, 85-94, 4. DOI: 10.5220/0006509000850094.

https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#ga86fcda65ced0aafa2741088d82e9161c

Implementation

static Future<Mat> edgePreservingFilterAsync(
  InputArray src,
  int d,
  double threshold, {
  OutputArray? dst,
}) async {
  dst ??= Mat.empty();
  return cvRunAsync0(
    (callback) => ccontrib.cv_ximgproc_edgePreservingFilter(src.ref, dst!.ref, d, threshold, callback),
    (c) {
      return c.complete(dst);
    },
  );
}