filter2D function

Mat filter2D(
  1. InputArray src,
  2. int ddepth,
  3. InputArray kernel, {
  4. OutputArray? dst,
  5. Point? anchor,
  6. double delta = 0,
  7. int borderType = BORDER_DEFAULT,
})

Filter2D applies an arbitrary linear filter to an image.

For further details, please see: https:///docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga27c049795ce870216ddfb366086b5a04

Implementation

Mat filter2D(
  InputArray src,
  int ddepth,
  InputArray kernel, {
  OutputArray? dst,
  Point? anchor,
  double delta = 0,
  int borderType = BORDER_DEFAULT,
}) {
  dst ??= Mat.empty();
  anchor ??= Point(-1, -1);
  cvRun(() => cimgproc.Filter2D(src.ref, dst!.ref, ddepth, kernel.ref, anchor!.ref, delta, borderType));
  return dst;
}