How a computer finds features
Did you see the left side fall apart?
That method compares the whole shape at once. It lays your handwriting on top of a reference picture and counts how many pixels don't match. So tilt it a little, or write it a little bigger, and the mismatch count jumps.
You can read a crooked 3 just fine. That's because you know what a 3 looks like — a bump at the top, a pinch in the middle, another bump at the bottom. Those are its .
But how do you get a computer to find them?
Sweeping a little window across
The trick is surprisingly simple. You make a little window and slide it across the picture. That little window is called a .
The little window moves across the picture one step at a time.
The filter holds nine numbers. Wherever it lands, you multiply the nine brightness values under it by the nine numbers in the filter, then add everything up. That sum is the result for that spot.
Multiplying and adding. That's all it does. But depending on which numbers you put in the filter, this simple sum will pick out vertical lines, or horizontal ones.
One layer isn't enough
A single filter only finds one kind of line. But you're not trying to spot lines. You're trying to spot a cat.
So you stack them.
You take all the lines the first layer found, and sweep more filters over those. Now you get patterns made of lines. Sweep again, and you get shapes made of patterns.
The higher the layer, the bigger the thing it recognises.
Line-finding filters really are in layer 1. Yours doesn't have to look identical — if it does the same job, it lives in the same place. Go up to layer 3 and you'll start seeing eyes and faces.
Stacking like this means the computer works its way up: lines → patterns → shapes.
The right side never compares the whole shape. It hunts for features, bit by bit, and adds them up. Tilt the number a little and the features are still there.
But who picks those numbers?
You might have noticed something odd.
You had a go at building the filter that finds horizontal lines. But there are thousands of things worth spotting — cat ears, car wheels, letter strokes, leaf shapes. Could a person really write all of those out, one by one?
No. And real AI doesn't have people write them.
So who picks them? That's what the next part is about.
Sources for this chapter
- 15 OCR-A (American Type Founders, 1968) · ANSI X3.17-1981 · ISO 1073-1
- 27 United States Postal Service, 1997 Annual Report, p.43 — the Remote Computer Reader, built on University at Buffalo (CEDAR) handwritten address interpretation
- 28 OCR trade histories on the first commercial installations (Shepard / Intelligent Machines Research Corp. at Reader's Digest, mid-1950s) — decade only; no primary source located
- H1 Weights we trained ourselves. We drew the training characters too
- P2·P3 Photos that need no credit line (CC0 · public domain · Pexels)
- P3 The response maps come from running the photos through a pre-trained network. We don't ship the weights