fixed pca bug for fixed mean input
This commit is contained in:
parent
2aa5f1bfd1
commit
81779d8287
@ -2855,8 +2855,9 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComp
|
|||||||
|
|
||||||
if( _mean.data )
|
if( _mean.data )
|
||||||
{
|
{
|
||||||
CV_Assert( _mean.size() == mean_sz );
|
CV_Assert( _mean.size() == mean_sz );
|
||||||
_mean.convertTo(mean, ctype);
|
_mean.convertTo(mean, ctype);
|
||||||
|
covar_flags |= CV_COVAR_USE_AVG;
|
||||||
}
|
}
|
||||||
|
|
||||||
calcCovarMatrix( data, covar, mean, covar_flags, ctype );
|
calcCovarMatrix( data, covar, mean, covar_flags, ctype );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user