[Numpy-discussion] reconstruct image from eigenfaces

2008-03-27 Thread royG
hi i am trying to reconstruct face images from eigenfaces derrived from original set of face images. i represented orig images by an ndarray with each row for each image and each column for pixel intensity.I sorted the eigenvectors such that each row of sortedeigenvectors is an eigenvector(first ro

Re: [Numpy-discussion] creating eigenface images

2008-03-25 Thread royG
least significant eigenimage > is "deteriorated" is logical. Eigenimages are trying to represent in a > linear way something that is not. The smallest variations are then > represented by an artifact, and this is what you get. > > thanks Matthieu ..if that is the logical behaviour then i believe my

[Numpy-discussion] creating eigenface images

2008-03-25 Thread royG
hi As discussed in the thread http://groups.google.com/group/Numpy-discussion/browse_thread/thread/b9774ac757c3c 98e/a66aa2565d4e6a24 i tried to create an application to create eigenfaces from a set of jpeg images.I followed these steps after obtaining an ndarray of 17 images (ie 17 rows where ea

Re: [Numpy-discussion] eigenface image too dark

2008-03-19 Thread royG
> Longer solution: >Scale your array: > a_min = inputarray.min() > a_max = inputarray.max() > disp_array = ((inputarray-a_min)* 255/(a_max - a_min)).astype('uint8')\ > . thanx Nadav..the scaling works..and makes clear images but why .astype("uint8") ? can't i use the a

[Numpy-discussion] eigenface image too dark

2008-03-18 Thread royG
hi while trying to make an eigenface image from a numpy array of floats i tried this from numpy import array import Image imagesize=(200,200) def makeimage(inputarray,imagename): inputarray.shape=(-1,) newimg=Image.new('L', imagesize) newimg.putdata(inputarray) newimg.save

[Numpy-discussion] dot() instead of tensordot()

2008-03-10 Thread royG
hi can numpy.dot() be used instead of tensordot()? is there any performance difference? I am talking about multipln btw numpy arrays of dimensions 50 X 20,000 where elements are of float type. RG ___ Numpy-discussion mailing list Numpy-discussion@scipy.

[Numpy-discussion] eigenvector and eigenface

2008-03-09 Thread royG
friends I am learning eigenfaces using numpy . i use data from N images and create eigenvectors to get a 'sorted eigenvectors' array of size N X N. when i project the 'zero mean imagedata' i will get a facespace array of N X numpixels. (where numpixels is total pixels in one image) is eigenface t