Part I · Chapter 01

What Is an Image?

When you glance at a photograph, you effortlessly see faces, clouds, and sunlight. When a computer opens the exact same file, it sees none of those things — only a glowing grid of tiny light tiles. Let's step inside that grid and see the world the way a machine does.

1. Seeing Through a Screen Door

Imagine holding a magnifying glass up to your phone screen — closer, and closer still — until every smooth curve suddenly snaps into a rigid checkerboard of tiny glowing squares. Each of those squares is a pixel (short for picture element).

A computer never sees a "circle" or an "eye" directly. It only sees how bright each individual tile in the mosaic happens to be: completely dark, faintly glowing, half-lit, or shining at full strength. The illusion of a smooth picture only appears when there are enough tiles packed closely together that your eye stops noticing the seams.

Try it yourself below. Pick a shape — or paint right onto the grid with your mouse or finger — and drag the Resolution slider back and forth. Watch how the exact same picture dissolves into chunky blocks at low resolution and snaps into crisp curves as the grid grows finer.

Interactive Lab 1.1 Pixel Grid & Resolution Zoom

Hover over any tile to inspect its brightness bar on the right. Click and drag on the grid to paint your own light!

Grid Resolution 16 × 16 tiles
Detail vs. 4×4: 16× more tiles Hovered Tile: Hover a tile Compared to Average: —
✦ Key Relationship

Doubling the number of tiles across and doubling the number of tiles down does not give you twice as many tiles — it gives you four times as many! Going from a coarse 4×4 grid to a 32×32 grid is 8× finer along each edge, which means 64× more tiles for the computer to store and inspect.

2. Every Color Is a Recipe of Three Spotlights

So far, each tile only knew one thing: how bright am I? That gives us a black-and-white photograph. How do we bring color into the picture?

You might expect a computer to keep a giant dictionary of color names — sky blue, sunset orange, forest green. Instead, cameras and screens borrow a clever shortcut from your own eyes. Deep inside your retina, you only have three kinds of color sensors, tuned to Red, Green, and Blue light. Every color you have ever seen on a screen is just a blend of those three lights shining together at different strengths.

In the spotlight studio below, adjust the strength of each colored beam — or drag the spotlights around the stage to see where they overlap. Notice what happens when two or three beams land on the same spot!

Interactive Lab 1.2 Color Mixing Spotlight (Red, Green & Blue Light)

Slide each light's relative strength, try a preset recipe, or drag the glowing spotlights on the stage to overlap them.

Red Light 100%
Green Light 85%
Blue Light 25%
Center Blend: Warm Gold Light Balance: Red strongest, Blue quiet
? Pause & Think

In elementary school art class, mixing red and green paint together gave you a muddy brown. Why did mixing Red and Green spotlights in the lab above create a bright, glowing Yellow?

Paint works by taking light away: red paint absorbs most light and only bounces red back, while green paint absorbs red. Mix them together and almost all light gets soaked up, leaving dark brown.

Screens and spotlights work in reverse — they add light together. Shining both red and green beams into your eye excites both your red and green sensors at once, and your brain interprets that double signal as vibrant yellow. Turn on all three lights at full power, and you get pure white!

3. Brightness as a 3D Landscape

Before we wrap up this chapter, let's make one mental leap that will pay off in every single chapter to come.

Stop thinking of a black-and-white image as a flat photograph lying on a table. Instead, imagine that brightness is elevation. Wherever a pixel is pitch black, the ground sits at sea level. Wherever a pixel glows brightly, the ground rises up into a towering mountain peak.

Drag directly on the 3D terrain below to spin and tilt it. Watch what happens to flat gray areas (they become smooth, level plateaus) and what happens where bright meets dark (they turn into sheer, dramatic cliffs!). You can even click Use My Drawing from Lab 1.1 to turn whatever you painted earlier into a glowing mountain range.

Interactive Lab 1.3 Brightness as a 3D Landscape

Drag anywhere on the 3D wireframe to orbit and tilt the terrain. Brighter pixels rise into gold peaks; dark pixels sink into deep blue valleys.

Peak Height 100%
Camera Tilt Balanced view
Terrain Shape: Glowing Ring Highest Peak vs. Valley: Strong contrast Steepest Cliffs: Along the bright rim
★ Core Intuition

Viewing an image as a landscape of heights makes computer vision suddenly feel physical. A blurry photo is a landscape of gentle rolling hills. A sharp outline is a steep cliff. A bright corner is a sharp mountain peak. In the next chapter, we'll build tiny sliding detectors that walk across this terrain and tell us where every hill and cliff is hiding.

Chapter 1 Takeaways

  • A digital image is a grid of pixels, where each tile simply stores how brightly it should glow.
  • Resolution controls how finely the grid slices the scene: doubling both width and height creates four times as many tiles.
  • Every color pixel is a three-spotlight recipe of Red, Green, and Blue light added together.
  • Thinking of brightness as 3D elevation turns flat areas into plateaus and visual boundaries into steep cliffs.