Computer vision — how a machine "sees"
The phone looks at Grandmother's kangri and says: pot. It has no eyes and no brain. So how does it see anything at all?
- Draw a picture using only 0s and 1s
- Teach a camera kangri vs pot
- Test it on photos it has never seen
Computer vision — how a machine "sees"
The phone looks at Grandmother's kangri and says: pot. It has no eyes and no brain. So how does it see anything at all?
- Draw a picture using only 0s and 1s
- Teach a camera kangri vs pot
- Test it on photos it has never seen
Story
he laughs.
Learn it
A camera does not give the computer a picture the way your eyes see one. It gives it a grid of tiny squares, and every square is stored as numbers. Computer Vision is the domain of AI that finds patterns in those numbers (edges, shapes, colours) and learns from many labelled examples what they mean. If it never saw a kangri while learning, it guesses the nearest thing it knows: a pot.
Words to know
one tiny square of a digital image. Zoom in far enough on any photo and you will see them.
the number stored for a pixel. In a black-and-white image, 0 is black and 255 is white.
a colour pixel has three numbers: how much Red, Green and Blue light is in it.
the domain of AI that helps machines understand images and video.
a place where the numbers change sharply, like the border between a dark kangri and a light wall. Edges make shapes.
saying what is in a picture, such as "kangri" or "pot". It is classification, using pixels as the features.
Step by step: a picture made of numbers
Here is a 5 × 5 image where 1 = black and 0 = white:
0 0 1 0 0
0 1 1 1 0
1 1 1 1 1
0 0 1 0 0
0 0 1 0 0
- Read it as a grid: 5 rows of 5 pixels, 25 numbers in all.
- Shade every 1: a tree appears, a triangle on a trunk.
- Spot the pattern: the 1s widen row by row, then shrink to one column. A model finds patterns like this: wide at the bottom of the top part, a thin line below.
- Scale it up: a real phone photo has millions of pixels, each with three RGB numbers, and the same idea works on all of them.
How it learns: show it many labelled pictures, kangri and pot, and it learns which number patterns go with which label. Used in face unlock, spotting scab on apple leaves, reading number plates, and medical scans.
Careful: the computer does not see the way you do. It has only numbers. It does not know what a kangri is for, or that it is warm. And more colours do not mean it understands better; they only mean more numbers to work with.
Your missions
pixel-grid.ods · Teachable Machine in the browser (no account) · cv-photos/kangri, cv-photos/pot, cv-photos/testDraw with numbers
pairs8 min- 1
Open
pixel-grid.ods— a 10 × 10 grid that colours itself: 0 = black, 1 = white. - 2
Type 0s and 1s to draw something — a chinar leaf, a house, the first letter of your name.
- 3
Look at the picture, then at the numbers. They're the same thing. That's what a camera gives a computer.
Teach a camera
pairs10 min- 4
Teachable Machine → Image Project → Standard image model. Don't sign in. Name the classes
kangriandpot. - 5
Upload the photos from
cv-photos/kangriandcv-photos/pot, then Train Model. - 6
Predict: how many of the
testphotos will it get right? Write your guess down.Only you can see this - 7
Test it with
cv-photos/test— photos it has never seen. Note which it got right and wrong.
No laptop today?
On squared paper, your partner reads out a 10 × 10 grid of 0s and 1s from the sheet your teacher gives you while you shade every 0. Can you guess the picture before it's finished? Then discuss: with only 3 kangri pictures, could you recognise every kangri?
Debate it
A CV system that spots faces was trained mostly on photos taken in bright sunshine. Now it is used indoors in a dim classroom in winter.
Who might it fail for, and what data would fix it?
Check yourself · practice, not a test
In the app, students answer these one at a time and each answer is checked straight away. It's practice, never a mark — anything they miss comes back later for another go.
1.What is a pixel?
- AA type of camera
- BOne tiny square of a digital image, stored as numbers
- CA computer program
- DA colour of paint
2.A computer "sees" a photo as a grid of numbers.
TrueFalse3.Which of these use Computer Vision? (choose all)
- AFace unlock on a phone
- BA calculator
- CSpotting scab on apple leaves from a photo
- DReading a vehicle's number plate
4.A model trained with too few ______ may not recognise a kangri.
To a computer, a picture is just numbers. Computer vision finds the patterns in them.
Typing practice
Skill: number row, 6 to 0 (7 min)
- On typing.com, open the lesson on the top-row numbers 6–0.
- Right hand reaches up. Say the number quietly as you press it.
- Then type this line three times:
0 255 128 64 32 0. These are pixel values you will use today.
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.