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(() => ccore.cv_trace(mtx.ref, ptr, ffi.nullptr));
return Scalar.fromPointer(ptr);
}