How to take principal component to get eigenvalues for an array of face images
1 次查看(过去 30 天)
显示 更早的评论
Hello, I'm trying to get started on eigenfaces in Matlab. I read in images 100 x 100 grey level with imread. Turned each one into single column of data 10,000 data points long. Created a matrix A with four columns (four images) of data 10,000 rows long. I then tried to use
[COEFF, SCORE, latent] = princomp(A); but it gives me : _Error using svd Out of memory. Type HELP MEMORY for your options.
Error in princomp (line 86) [U,sigma,coeff] = svd(x0,econFlag); % put in 1/sqrt(n-1) later
Error in face1 (line 37) [COEFF, SCORE, latent] = princomp(A);_
----------------
size(A) = 4 x 10000
I just wanted to try four pictures before moving on to get fussy about the face images but it's already telling me it's out of memory.
Please help. I know people use Matlab to do Eigenfaces. What am I doing wrong ? Help please.
0 个评论
回答(1 个)
bym
2012-5-9
I am no expert, but I think it has do with how you are arranging the matrix. See Eigenface , in particular the section about computing the Eigenvalues for reducing the size of the problem
>> size(princomp(rand(100,4)))
ans =
4 4
>> size(princomp(rand(4,100)))
ans =
100 100
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!