calcCovarMatrixAsync function

Future<(Mat, Mat)> calcCovarMatrixAsync(
  1. InputArray samples,
  2. InputOutputArray mean,
  3. int flags, {
  4. OutputArray? covar,
  5. 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, {
  OutputArray? covar,
  int ctype = MatType.CV_64F,
}) async {
  covar ??= Mat.empty();
  return cvRunAsync0(
    (callback) => ccore.cv_calcCovarMatrix(
      samples.ref,
      covar!.ref,
      mean.ref,
      flags,
      ctype,
      callback,
    ),
    (c) {
      return c.complete((covar!, mean));
    },
  );
}