开发者

problem in performing pca in emgucv

I'm trying to perform PCA in EmguCV as:

Matrix matrix = new Matrix(noOfSamples, noOfFeatures); 

// put data in matrix 

Matrix pMean = new Matrix(1, noOfFeatures);

Matrix pEigVals = new Matrix(noOfFeatures, 1); 

Matrix pEigVecs = new Matrix(noOfFeatures, noOfFeatures); 

CvInvoke.cvCalcPCA(matrix, pMean, pEigVals, pEigVecs, PCA_TYPE.CV_PCA_DATA_AS_ROW);

But I get an error when noOfFeatures > noOfSamples. It works fine in other cases. This implies that if I have images of size开发者_运维技巧 32*32=1024=noOfFeatures, then I'll need atleast 1024 samples which is so impractical. I just have around 100 samples. How can I perform PCA in this case?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜