AI Teading - TeensTry AI for yourself

Part 2 · AI that sees and hears

2.1

A photo is numbers

Zoom into a photo far enough and what do you get? Squares — and every square has a number on it.

P1 Pixel magnifier

A photo is numbers

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 .

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.

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

  1. 20 NIST, "First Digital Image" · "Fiftieth Anniversary of First Digital Image Marked" (2007)

See the full list