source: libs/vision/python/plot.py @ 150

Revision 150, 391 bytes checked in by dave, 10 years ago (diff)

more moving

Line 
1import numpy as np
2import scipy.misc.pilutil as smp
3
4# Create a 1024x1024x3 array of 8 bit unsigned integers
5data = np.zeros( (1024,1024,3), dtype=np.uint8 )
6
7data[512,512] = [254,0,0]       # Makes the middle pixel red
8data[512,513] = [0,0,255]       # Makes the next pixel blue
9
10img = smp.toimage( data )       # Create a PIL image
11img.show()                      # View in default viewer
Note: See TracBrowser for help on using the repository browser.