B2 · How Artificial Intelligence Works: Data and Learning

How Computers See Images

A digital image is a grid of tiny squares called pixels. Each pixel stores numbers for its colour, usually three numbers for how much red, green and blue light it has. Resolution is the number of pixels in the image.

10 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

Zoom into a photo again and again. What do you find in the end?

A digital image is a grid of tiny squares called pixels. Each pixel stores numbers for its colour, usually three numbers for how much red, green and blue light it has. Resolution is the number of pixels in the image.

In simple words

To a computer, a photo is not a cat or a sunset. It is a huge table of numbers. A black-and-white picture can be just 0 for white and 1 for black. A colour pixel might be (255, 0, 0) for bright red. When AI 'sees', it looks for patterns in these numbers.

Why it matters

Face unlock, medical scans, self-driving cars and photo search all start here. Once you know an image is numbers, you can see how a machine can learn that certain patterns of numbers mean 'face' or 'stop sign'.

How it works

ColourRedGreenBlue
Black000
White255255255
Bright red25500
Yellow2552550

Try it yourself

Build a picture pixel by pixel

Draw on the grid and watch the numbers change. Then mix a colour from red, green and blue.

Common mistakes

  • Thinking the computer sees objects. It sees numbers and learns which patterns go with which objects.
  • Thinking resolution is the size of the screen. It is the number of pixels in the image.
  • Thinking colours are stored as names. They are stored as numbers.

Check yourself

Question 1

1. What is a pixel?

Question 2

2. Which numbers make white?

Question 3

3. An 8 by 8 black-and-white picture stores how many numbers?

Summary

  • A digital image is a grid of pixels.
  • Each pixel stores colour as numbers, often red, green and blue.
  • AI 'sees' by finding patterns in those numbers.

Finished reading?