sumAsync 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
Future<Scalar> sumAsync(Mat src) async {
final p = calloc<cvg.Scalar>();
return cvRunAsync0(
(callback) => ccore.cv_sum(src.ref, p, callback),
(c) {
return c.complete(Scalar.fromPointer(p));
},
);
}