diff --git a/modules/core/src/matmul.cpp b/modules/core/src/matmul.cpp index 4be9c4daa3..06d57685fb 100644 --- a/modules/core/src/matmul.cpp +++ b/modules/core/src/matmul.cpp @@ -2994,6 +2994,7 @@ PCA& PCA::computeVar(InputArray _data, InputArray __mean, int flags, double reta { CV_Assert( _mean.size() == mean_sz ); _mean.convertTo(mean, ctype); + covar_flags |= CV_COVAR_USE_AVG; } calcCovarMatrix( data, covar, mean, covar_flags, ctype );