Prev: How rotate a dscrete 2D curve around the Y axis for obtaining the surface?
Next: matlab + simulink in a cave-type system?
From: Nadun on 18 Jun 2010 10:51 Hello, I'm in a big problem.I'm working in eigenface recognition problem. So I code following matlab function <code> function [Eigenfaces] = getEigenFaces(A) L = A'*A; M = uint32(L) [V D] = eig(L); L_eig_vec = []; for i = 1 : size(V,2) if( D(i,i)>1 ) L_eig_vec = [L_eig_vec V(:,i)]; end end Eigenfaces = A * L_eig_vec; % A: centered image vectors </code> This give me following exception in Visual Studio.net 2008 /C shap <exception> out of memory </exception> I tryed this code it is working perfectly in Matlab. and I compiled following part and itergrated with C sharp it is working fine. <code> L = A'*A; </code> Here is the code that I call form C sharp <code> MWNumericArray matrix = new MWNumericArray(MWArrayComplexity.Real, MWNumericType.Single, nrfaces, elem); for (int i = 1; i < nrfaces; i++) { for (int j = 1; j < elem; j++) { matrix[i, j] = 2; } } argOut = covariance.getEigenFaces((MWArray)matrix); </code> Please help me I went accross lot of web sites user groups(Including this) I could not find a solution Thanks |