A computer can't look at a photo. Numbers are the only thing a computer has.
So getting a photo into a computer means turning it into numbers. How? Chop the photo into tiny pieces and, for each piece, write down one number: how bright is it?
That's clumsy in words. Zoom in yourself and it takes five seconds.
Lab P1
Push the zoom slider all the way to the right.
One square is a pixel
One of those squares is a .
0 is black. No light at all
255 is white. As bright as it goes
Everything between is grey. 128 is a middling grey
What happened to the photo on the left when you set a pixel to 0? That spot went black.
Here's the thing to catch. You didn't edit a photo — you edited a number. To a computer those are the same act.
Colour takes three numbers
Press Colour and each pixel holds three numbers.
How much red, how much green, how much blue. Mix those three and you can make any colour.
255, 0, 0 → bright red
255, 255, 0 → yellow (red and green mixed makes yellow)
0, 0, 0 → black
255, 255, 255 → white
That's not how paint behaves. Paint gets darker the more you mix; light gets brighter. A screen is light, not paint.
So what do we do with the numbers?
Now that it's a table of numbers, we can do arithmetic on it.
Next chapter we multiply and add them. That alone is enough to find the lines inside a photo.
Sources for this chapter
20NIST, "First Digital Image" · "Fiftieth Anniversary of First Digital Image Marked" (2007)