diff --git a/modules/core/src/pca.cpp b/modules/core/src/pca.cpp index 0fa470005a..5fdce55cea 100644 --- a/modules/core/src/pca.cpp +++ b/modules/core/src/pca.cpp @@ -239,6 +239,7 @@ PCA& PCA::operator()(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 );