pub fn calc_covar_matrix(
samples: &impl ToInputArray,
covar: &mut impl ToOutputArray,
mean: &mut impl ToInputOutputArray,
flags: i32,
ctype: i32,
) -> Result<()>Expand description
Calculates the covariance matrix of a set of vectors.
The function cv::calcCovarMatrix calculates the covariance matrix and, optionally, the mean vector of the set of input vectors.
§Parameters
- samples: samples stored as separate matrices
- nsamples: number of samples
- covar: output covariance matrix of the type ctype and square size.
- mean: input or output (depending on the flags) array as the average value of the input vectors.
- flags: operation flags as a combination of [covar_flags]
- ctype: type of the matrixl; it equals ‘CV_64F’ by default.
§See also
PCA, mulTransposed, Mahalanobis @todo InputArrayOfArrays
§Overloaded parameters
Note: use COVAR_ROWS or COVAR_COLS flag
- samples: samples stored as rows/columns of a single matrix.
- covar: output covariance matrix of the type ctype and square size.
- mean: input or output (depending on the flags) array as the average value of the input vectors.
- flags: operation flags as a combination of [covar_flags]
- ctype: type of the matrixl; it equals ‘CV_64F’ by default.
§C++ default parameters
- ctype: CV_64F