integral function

(Mat, Mat, Mat) integral(
  1. InputArray src, {
  2. OutputArray? sum,
  3. OutputArray? sqsum,
  4. OutputArray? tilted,
  5. int sdepth = -1,
  6. int sqdepth = -1,
})

Integral calculates one or more integral images for the source image. For further details, please see: https:///docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga97b87bec26908237e8ba0f6e96d23e28

Implementation

(Mat sum, Mat sqsum, Mat tilted) integral(
  InputArray src, {
  OutputArray? sum,
  OutputArray? sqsum,
  OutputArray? tilted,
  int sdepth = -1,
  int sqdepth = -1,
}) {
  sum ??= Mat.empty();
  sqsum ??= Mat.empty();
  tilted ??= Mat.empty();
  cvRun(() => cimgproc.cv_integral(src.ref, sum!.ref, sqsum!.ref, tilted!.ref, sdepth, sqdepth, ffi.nullptr));
  return (sum, sqsum, tilted);
}