Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- import numpy, matplotlib.pyplot
- image = Image.open("image.png")
- pixels = numpy.asarray(image)
- print pixels
- ####result
- [[[255 255 255 255]#<--- 1st bracket
- [255 255 255 255]#<--- 2nd bracket
- [255 255 255 255]#<--- 3rd bracket
- ... #<--- n-nd bracket
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]
- [[255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]
- ...
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]
- [[255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]
- ...
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]
- ...
- [[255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]
- ...
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]
- [[255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]
- ...
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]
- [[255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]
- ...
- [255 255 255 255]
- [255 255 255 255]
- [255 255 255 255]]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement