anisotropicDiffusion static method

Mat anisotropicDiffusion(
  1. InputArray src,
  2. double alpha,
  3. double K,
  4. int niters, {
  5. OutputArray? dst,
})

Performs anisotropic diffusion on an image.

The function applies Perona-Malik anisotropic diffusion to an image. https://docs.opencv.org/4.x/df/d2d/group__ximgproc.html#gaffedd976e0a8efb5938107acab185ec2

Implementation

static Mat anisotropicDiffusion(
  InputArray src,
  double alpha,
  double K,
  int niters, {
  OutputArray? dst,
}) {
  final p = dst?.ptr ?? calloc<cvg.Mat>();
  cvRun(() => cffi.ximgproc_anisotropicDiffusion(src.ref, p, alpha, K, niters));
  return dst ?? Mat.fromPointer(p);
}