fixed pca bug for fixed mean input

This commit is contained in:
Bo Li 2013-05-09 15:20:00 +08:00
parent 2aa5f1bfd1
commit 81779d8287

View File

@ -2855,8 +2855,9 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComp
if( _mean.data )
{
CV_Assert( _mean.size() == mean_sz );
CV_Assert( _mean.size() == mean_sz );
_mean.convertTo(mean, ctype);
covar_flags |= CV_COVAR_USE_AVG;
}
calcCovarMatrix( data, covar, mean, covar_flags, ctype );