giovedì 23 aprile 2009

Image to Array with numpy.asarray()

http://docs.scipy.org/doc/numpy/reference/index.html
At the link above you can find a sort of reference manual of Numpy.
Here some sample code from: http://stackoverflow.com/questions/524930/numpy-pil-adding-an-image

from PIL import Image
from numpy import *

im1
= Image.open('/Users/rem7/Desktop/_1.jpg')
im2
= Image.open('/Users/rem7/Desktop/_2.jpg')


im1arr
= asarray(im1)
im2arr
= asarray(im2)

Nessun commento:

Posta un commento