• An image is a 2D rectilinear array of pixels
raster: grid, matrix, 2d array, tensor
from numpy import random as r
I = r.rand(256,256);
from matplotlib import pyplot as p
from numpy import random as r
I = r.rand(256,256);
p.imshow(I);
p.show();


from matplotlib import pyplot as p
from numpy import random as r
I = r.rand(256,256);
p.imshow(I,cmap=‘gray’);
p.show();

Next issue: matplotlib will normalize input e.g., map the lowest value to 0, and the highest to 1. Even though we multiplied by 0.5, the overall brightness is the same.
from matplotlib import pyplot as p
from numpy import random as r
I = r.rand(256,256)*0.5;
p.imshow(I,cmap=‘gray’);
p.show();
