CV Lab – 1
Computer Vision Lab: Pixels as Numbers
Explore how a grayscale image can be stored as a 2D grid of numbers. Change brightness, contrast, resolution and zoom, then compare the picture with its pixel values.
2. The bitmap of numbers
Each cell = 1 pixel valueWhat should you notice?
Pixel value: Each cell stores a number from 0 to 255. A value of 0 appears black; 255 appears white.
Grayscale: One number per pixel is enough because the pixel represents only brightness, not a colour.
Image dimensions: An image with width × height pixels has that many pixels. For an uncompressed 8-bit grayscale image, the pixel data uses approximately width × height bytes, excluding file headers and other metadata.
Resolution vs zoom: Resolution changes how many pixel samples are used. Zoom only changes how large the image appears on screen.
