edgePreservingFilter static method

Mat edgePreservingFilter(
  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 Mat edgePreservingFilter(InputArray src, int d, double threshold, {OutputArray? dst}) {
  final p = dst?.ptr ?? calloc<ccontrib.Mat>();
  cvRun(() => ccontrib.ximgproc_edgePreservingFilter(src.ref, p, d, threshold));
  return dst ?? Mat.fromPointer(p);
}