Lauri Love (nsh) wrote:
Let me know if there is any faster solution short of coding in some
distance functions to the C modules
You might do better with numpy and/or scipy.ndimage.
You can convert a PIL RGB image to a numpy array very easily. I think
it's as simple as:
import numpy as np
arr = np.asarray(pil_image)
Then you have a WxHx3 array of uint8 values you can do all sorts of math on.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
chris.bar...@noaa.gov
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig