Read an Image with python
If you want to read an image, you will need the ‘image’ package: import Image read the image: Image.open(filename) convert the Image to grey scale: Image.open(filename).convert(‘L’) convert the image to array: numpy.asarray(Image.open(filename).convert(‘L’)) Notice: Here is a introduction to “Image” package…