Re: average of PIL images

2008-02-19 Thread vaneric
> > a) Work with the 3 components in parallel (that is, use 3 separate > matrices, one for each component, and regenerate the image at the > end). that wd be ok for image generation ..but to calculate covariance matrix from the set of images i don't know if it wd work eric -- http://mail.pyth

Re: average of PIL images

2008-02-19 Thread vaneric
> > def rgbTopixelvalue((r,g,b)): > >alpha=255 > >return unpack("l", pack("", b, g, r, alpha))[0] > > That's much worse than averaging the R,G,B components. oops! the intention was to pack r,g,b components into a single value sothat calculations like finding covariant matrix of a set

Re: average of PIL images

2008-02-18 Thread vaneric
On Feb 19, 1:38 am, Robert Kern <[EMAIL PROTECTED]> wrote: >Averaging color > images is tricky; you really shouldn't do it in the RGB colorspace. hi, thanx for the guidance and detailed replies..I tried to pack the r,g,b into a single value like below(something a member posted in the past) def

Re: average of PIL images

2008-02-18 Thread vaneric
On Feb 19, 1:38 am, Robert Kern <[EMAIL PROTECTED]> wrote: >Averaging color > images is tricky; you really shouldn't do it in the RGB colorspace. hi, thanx for the guidance and detailed replies..I tried to pack the r,g,b into a single value like below(something a member posted in the past) def r

average of PIL images

2008-02-18 Thread vaneric
hi i have a set of RGB images of diff faces (of people )as a 2 dim numpyarray ..something like threefaces=array([[xa1,xa2,xa3], [xb1,xb2,xb3], [xc1,xc2,xc3]]) where xa1,xa2,xa3 are tuples each representing rgb values of a pixel of first image .. i need to create the average face ima