sum function

Scalar sum(
  1. Mat src
)

Calculates the sum of array elements.

The function cv::sum calculates and returns the sum of array elements, independently for each channel.

https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga716e10a2dd9e228e4d3c95818f106722

Implementation

Scalar sum(Mat src) {
  final p = calloc<cvg.Scalar>();
  cvRun(() => cffi.Mat_Sum(src.ref, p));
  return Scalar.fromPointer(p);
}