[Tutor] Image Analysis

wormwood_3 wormwood_3 at yahoo.com
Tue Sep 11 16:42:32 CEST 2007


Thanks very much! This may be exactly what I need, and in any case will be a great starting point!

-Sam

___________________________
----- Original Message ----
From: "Carnell, James E" <jecarnell at saintfrancis.com>
To: tutor at python.org
Sent: Tuesday, September 11, 2007 9:45:30 AM
Subject: Re: [Tutor] Image Analysis




"wormwood_3" <wormwood_3 at yahoo.com> wrote

> I need some way to analyze an image for color patterns.
>
> My only lead right now is PIL, and I am not sure if it will meet my
> needs.

I am using PIL and numpy


##### something hat at least looks sorta like
 import numpy
 import PIL
 myImage = Image.open("C:\\file.bmp")

 myImage.assarray(stuff) 

I can't remember the code and am at work, but this will give you a big
array to work with. Each pixel for RGB looks kind of like [100,150,250]
then each line is in a matrix etc. It's a bit of a pain traversing the
matrices, but you can do anything you would do to an array. Pyro
Robotics also has a small tutorial about this.

http://pyrorobotics.org/?page=PyroModuleVisionSystem

_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor





More information about the Tutor mailing list