How Computers See an Image

Pixels

Part of: Computer Vision Basics

Zoom into any digital photo far enough and the picture dissolves into a checkerboard of tiny colored squares. Each square is a pixel , and each pixel is just a number. Take a photo of your cat: to you it's a cat, to a computer it's a grid of numbers. That grid is the whole starting point of computer vision, everything else is math on top of it. What an image really is A grayscale image is a single 2D grid of brightness values. Every cell holds an integer from 0 (black) to 255 (white) , with the values in between being shades of gray. A color image is bigger: it's a stack of three grids called channels : one for red, one for green, one for blue. Stack them and you get a 3D array with shape (height, width, 3). Do the arithmetic and the numbers get large fast. A 1920×1080 photo is 1080 × 1920 × 3 = 6,220,800 values. So when someone says "the model takes an image as input," what they really mean is "the model takes a big array of integers." Nothing magical, just a lot of numbers arranged in a known shape. Why the shape matters Vision models care about structure , not just the raw count of pixels. The value at position (10, 50) in the red channel sits next to (10, 51) for a reason, thos

Challenge: The Brightness Gate