[Numpy-discussion] PCA on set of face images
devnew at gmail.com
devnew at gmail.com
Sat Mar 1 00:41:30 EST 2008
On Mar 1, 12:57 am, "Peter Skomoroch" wrote:
I think
> > matlab example should be easy to translate to scipy/matplotlib using the
> > montage function:
>
> > load faces.mat
> > %Form covariance matrix
> > C=cov(faces');
> > %build eigenvectors and eigenvalues
> > [E,D] = eig(C);
hi Peter,
nice code..ran the examples..
however couldn't follow the matlab code since i have no exposure to
matlab..was using numpy etc for calcs
could you confirm the layout for the face images data? i assumed that
the initial face matrix should be
faces=a numpy matrix with N rows ie N=numofimages
row1=image1pixels as a sequence
row2=image2pixels as a sequence
...
rowN=imageNpixels as a sequence
and covariancematrix=faces*faces_transpose
is this the right way?
thanks
More information about the NumPy-Discussion
mailing list