inpaint function

Mat inpaint(
  1. InputArray src,
  2. InputArray inpaintMask,
  3. double inpaintRadius,
  4. int flags,
)

Inpaint reconstructs the selected image area from the pixel near the area boundary. The function may be used to remove dust and scratches from a scanned photo, or to remove undesirable objects from still images or video. For further details, please see: https://docs.opencv.org/4.x/d7/d8b/group__photo__inpaint.html#gaedd30dfa0214fec4c88138b51d678085

Implementation

//
/// For further details, please see:
/// https://docs.opencv.org/4.x/d7/d8b/group__photo__inpaint.html#gaedd30dfa0214fec4c88138b51d678085
Mat inpaint(
  InputArray src,
  InputArray inpaintMask,
  double inpaintRadius,
  int flags,
) {
  final dst = Mat.empty();
  cvRun(
    () => cphoto.cv_inpaint(
      src.ref,
      inpaintMask.ref,
      dst.ref,
      inpaintRadius,
      flags,
      ffi.nullptr,
    ),
  );
  return dst;
}