[IMAGE-SIG] Spatial histograms

Andrew Kuchling amk@magnet.com
Mon, 14 Jul 1997 16:01:07 -0400 (EDT)

David Ascher wrote:
> Again, NumPy is probably the place to start -- or at least that's where
> I'd start -- C is too much of a pain, and NumPy is faster than my C code

	One installation of NumPy (without too much rat in it) later...

	Hmm... seems workable.  It's certainly a better fit for
implementing algorithms that go poking around at the pixel level,
since changing a single pixel's value in PIL requires a call to both
the setink() and point() methods of an ImageDraw object.  

	There's probably no burning need to make PIL a NumPy add-on
(though that would be neat); it would be enough to add a simple
.matrix() method to Image objects which handled the conversion to a
NumPy array object, and died with an ImportError if NumPy wasn't

	Andrew "Put all your eggs in one basket, having made sure it's
a really good basket" Kuchling 

IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org