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 Gabriel Genellina
On 19 feb, 06:28, vaneric <[EMAIL PROTECTED]> wrote: > > > 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

Re: average of PIL images

2008-02-19 Thread Gabriel Genellina
On 19 feb, 06:55, 7stud <[EMAIL PROTECTED]> wrote: > On Feb 19, 12:13 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > En Tue, 19 Feb 2008 04:01:04 -0200, vaneric <[EMAIL PROTECTED]>   > > escribió: > > > On Feb 19, 1:38 am, Robert Kern <[EMAIL PROTECTED]> wrote: > > >> Averaging color > >

Re: average of PIL images

2008-02-19 Thread 7stud
On Feb 19, 12:13 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 19 Feb 2008 04:01:04 -0200, vaneric <[EMAIL PROTECTED]>   > escribió: > > > 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 colo

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 Gabriel Genellina
En Tue, 19 Feb 2008 04:01:04 -0200, vaneric <[EMAIL PROTECTED]> escribió: > 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 pac

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

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 2:05 pm, 7stud <[EMAIL PROTECTED]> wrote: > num = arr[1:, 2:] > > That says to get all elements from row 1 to the bottom that are in > from column 2 to the end of the row. err.. That says to get all elements from row 1 to the last row which are in column 2, column 3, etc. to the end of

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 1:58 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Feb 18, 10:18 am, vaneric <[EMAIL PROTECTED]> wrote: > > > > > 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], > >    

Re: average of PIL images

2008-02-18 Thread 7stud
On Feb 18, 10:18 am, vaneric <[EMAIL PROTECTED]> wrote: > 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 va

Re: average of PIL images

2008-02-18 Thread Larry Bates
vaneric wrote: > 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 .. > >

Re: average of PIL images

2008-02-18 Thread Robert Kern
vaneric wrote: > 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 .. > >

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