trace function
Trace returns the trace of a matrix.
For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga3419ac19c7dcd2be4bd552a23e147dd8
Implementation
Scalar trace(InputArray mtx) {
final ptr = calloc<cvg.Scalar>();
cvRun(() => cffi.Mat_Trace(mtx.ref, ptr));
return Scalar.fromPointer(ptr);
}