sum function
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(() => ccore.cv_sum(src.ref, p, ffi.nullptr));
return Scalar.fromPointer(p);
}