calcCovarMatrixAsync function

Future<(Mat, Mat)> calcCovarMatrixAsync(
  1. InputArray samples,
  2. InputOutputArray mean,
  3. int flags, {
  4. int ctype = MatType.CV_64F,
})

CalcCovarMatrix calculates the covariance matrix of a set of vectors.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga017122d912af19d7d0d2cccc2d63819f

Implementation

Future<(Mat covar, Mat mean)> calcCovarMatrixAsync(
  InputArray samples,
  InputOutputArray mean,
  int flags, {
  int ctype = MatType.CV_64F,
}) async =>
    cvRunAsync<(Mat, Mat)>(
      (callback) => cffi.core_CalcCovarMatrix_Async(
        samples.ref,
        mean.ref,
        flags,
        ctype,
        callback,
      ),
      (c, p) => c.complete((Mat.fromPointer(p.cast<cvg.Mat>()), mean)),
    );