Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you need to specify the maxComponents that PCA should retain, i.e. change

PCA pca(input_feature_vector,Mat(),CV_PCA_DATA_AS_ROW, 0);

to

PCA pca(input_feature_vector,Mat(),CV_PCA_DATA_AS_ROW, 150);