traceAsync function

Future<Scalar> traceAsync(
  1. InputArray mtx
)

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

Future<Scalar> traceAsync(InputArray mtx) async {
  final ptr = calloc<cvg.Scalar>();
  return cvRunAsync0(
    (callback) => ccore.cv_trace(mtx.ref, ptr, callback),
    (c) {
      return c.complete(Scalar.fromPointer(ptr));
    },
  );
}