using PIL for PCA analysis

devnew at gmail.com devnew at gmail.com
Thu Feb 21 15:53:47 CET 2008


On Feb 21, 7:35 pm, "Bronner, Gregory" <gregory.bron... at lehman.com>
wrote:
you can do this using numpy and scipy
> fairly easily, and you can transform PIL arrays into Numpy arrays pretty
> quickly as well.
>

i can use numpy ndarray or matrix once i have a PIL array with
elements in the correct format(ie a single number for each pixel
instead of a tuple of integers)
it is the image data extraction step that is giving me the problem

ie i want PIL to return an image as something like
 [-4413029.0, -1.0463919E7,... -5201255.0]
instead of
 [(188, 169, 155), (96, 85, 81),.. (176, 162, 153)]

Any PIL experts please help
dn



More information about the Python-list mailing list