Ages

Now you know how cameras work!

What next?

Try it yourself ↓

How do cameras work?

▶ 5:17 video · Watch on YouTube

  1. 0:00 Start
  2. 0:52 Why it's upside down
  3. 1:36 The lens trick
  4. 2:31 How much light, for how long
  5. 3:16 Catching the light
  6. 4:15 Your turn

Your turn

Try the camera yourself

Play with the camera!

Each lab is one step from the video. Change things and see what happens.

Each lab isolates one part of the camera: pinhole geometry, focus, exposure and the sensor.

Drag, tap and slide.

1

The dark room

Drag your friend across the lawn. Where does their picture go?

Move the subject: the inverted image moves the opposite way, and left and right swap.

Drag your friend. Watch the upside-down picture!

2

Pinhole size

Make the hole bigger. What happens to brightness and sharpness?

Widen the aperture: each object point spreads into a disc the size of the hole.

Make the hole big, then small.

3

Focus the lens

Slide the lens until the tree on the wall is sharp.

Find the lens position where the image distance matches the screen (thin lens, f = 150).

Slide the glass until the tree looks sharp.

4

Aperture and shutter

The dog is running. Make the photo bright AND sharp.

Trade f-stops against shutter time: same exposure, different motion blur.

5

Colour filters

Switch on the colour filters, then blend the neighbours.

Toggle the Bayer mosaic and demosaicing (3×3 neighbour average).

Tap the buttons. Watch the colours!

6

Take a picture

Focus on the dog, set the light, and take the picture.

Balance focus, depth of field, exposure and motion blur, then shoot.

Slide the sliders, then take a picture!

How do cameras work?

A camera is a dark box that catches light. Light comes in through a small hole and makes a picture inside.

1. A picture on the wall

Long, long ago, people found a trick. Make a room very dark and poke one tiny hole in the wall. A picture of outside shows up on the far wall, in colour and moving. It is upside down! This dark room is called a camera obscura.

2. Why upside down?

Light goes in straight lines. Light from the top of a tree goes down through the hole and lands at the bottom. Light from the bottom lands at the top. So the picture flips.

3. The magic glass

A tiny hole makes a sharp but dark picture. A big hole makes it bright but fuzzy. A lens fixes that. It is a round glass, fat in the middle, that bends the light back together. Your eye has a lens too!

4. Catching the light

Inside a digital camera is a chip covered in lots of tiny light buckets. More light fills a bucket more. Each bucket wears a red, green or blue hat, and the camera mixes them into a full-colour picture.

Did you know? The dark-room trick is more than two thousand years old. The oldest camera photo that still exists may have needed hours, or even days, of sunshine!
Stay safe: never look at the Sun, not even through a camera or a shoebox camera. It can hurt your eyes. For eclipses, ask a grown-up about a safe pinhole projector.

How do cameras work? The short answer

A camera is a light-tight box with a small opening that lets light in and something at the back that records it.1 Light from every point of a scene travels in straight lines to the camera.3 The lens bends that light so each point lands as a sharp point on the back of the box, making an upside-down picture.78 The aperture controls how much light gets in, the shutter controls for how long, and film or a digital sensor captures the picture.18

The same basic idea works in a 19th-century wooden box, a professional camera and the one in your phone (the simplest camera, a pinhole camera, even works without a lens).

How does a camera work, step by step?

  1. Light leaves the scene. Light from the Sun or a lamp bounces off everything you point at, and travels in straight lines.3
  2. The lens focuses it. Curved glass bends the light so the rays from each point meet again at one point behind the lens.67
  3. You focus. The picture is only sharp at one distance behind the lens, so the camera moves the lens forward or back.8
  4. The aperture sets the opening. In many cameras a ring of blades makes the hole wider or narrower (many phone cameras have a fixed opening).8
  5. The shutter sets the time. It lets light build up on the sensor for a chosen time. It can be a little mechanical door or, as in most phones, an electronic timer.10
  6. The sensor records. Millions of pixels turn light into electric charge, and the camera turns those into numbers: your photo.15

The main parts are the box, the lens, the light controls (aperture and shutter), the recording surface (film or sensor) and a viewfinder or screen to aim with.1

The camera obscura: where cameras began

Camera obscura is Latin for "dark room". Make a room completely dark, let light in through one tiny hole, and a picture of the outside appears on the opposite wall, in colour and moving, but upside down.2 The Chinese philosopher Mozi wrote about it in the 5th century BCE, and the idea was probably known to ancient Greeks such as Aristotle more than 2,000 years ago.12

For centuries people used it to watch eclipses without looking at the Sun. By the 16th century artists used it to trace scenes, and in the late 1500s the Italian scholar Giambattista della Porta described one with a lens.2 A camera is really a camera obscura shrunk into a box, with something added to keep the picture.

Why is the camera image upside down?

Because light travels in straight lines.3 Light from the top of a tree heads downward through the hole and keeps going, so it lands low on the back wall. Light from the bottom heads upward and lands high. The rays cross at the hole, so the image is flipped top to bottom, and left to right as well.2 A lens does the same thing.8 A digital camera simply stores the picture the right way round.

Pinhole cameras: small hole or big hole?

A pinhole camera has no lens at all, just a tiny hole.4 The hole size is a trade-off:

HoleBrightnessSharpness
TinyDim: little light gets inSharp (until it's so tiny that light spreads out, called diffraction)
BigBrightBlurry: each point of the scene becomes a patch of light

Sources: Britannica and the Exploratorium.45 That trade-off is exactly why cameras have lenses.

How does a camera lens work?

A camera lens is curved glass (usually several pieces working together). Light travels more slowly in glass than in air, so it bends where it enters the glass and again where it leaves. This bending is called refraction.6 A lens that is thicker in the middle is a converging lens: it bends a whole cone of light from one point of the scene back together to one point on the other side.721 So you get a wide opening, lots of light, and a sharp picture.

The catch: the rays meet at one exact distance behind the lens, and that distance changes with how far away the subject is. Focusing a camera means moving the lens until the meeting point lands right on the film or sensor.8 The image a lens makes on a screen is called a real image, and it can fall on a screen, film or the retina of an eye.7

Camera vs eye: how do cameras see what we see?

JobCameraYour eye
Dark boxCamera bodyEyeball
Focus lightLens (moves to focus)Cornea + lens (changes shape to focus)
Control lightApertureIris and pupil (about 2 to 8 mm wide)
Record lightFilm or sensorRetina, with roughly 80 to 155 million rods and cones
ColourRed, green and blue filtersCone cells in the retina

Pupil size from Florida State University's vision primer; receptor count from Britannica.1622 Both make an upside-down image.916 Your eye's lens can't slide back and forth, so it focuses by getting thicker for close things.9 Your brain makes sense of the flipped picture, so the world looks the right way up. (That's a simplified picture: seeing happens in the brain, which doesn't need an image the right way up.)

Want to see how other animals do it? Read how cats see and how dogs see the world, or see how light travels.

Aperture and shutter: how much light, for how long

The amount of light that reaches the film or sensor is called the exposure. It depends on two things: how wide the aperture is, and how long the shutter stays open.8 Too little light makes a dark photo; too much makes it washed out.

Aperture and f-numbers

The aperture is the opening that lets light through the lens. In many cameras it can be made wider or narrower, like the pupil of your eye.816 Photographers describe it with an f-number: the lens's focal length divided by the width of the opening.11

f-number = focal length ÷ opening width e.g. 180 mm ÷ 40 mm = f/4.5

So a small f-number like f/2 means a big opening and lots of light. Each standard step (f/2, f/2.8, f/4, f/5.6, f/8…) lets in about half as much light as the one before, because the area of the opening halves.

Shutter speed and motion blur

A mechanical shutter is a set of metal blades or a pair of curtains that opens for a chosen time, then closes; phones usually time the exposure electronically instead.10 The right time depends on how bright the scene is and how fast things are moving.10 If a dog runs across the frame while the shutter is open, its image slides across the sensor and smears. That's motion blur. A fast shutter (like 1/1000 s) freezes motion; a slow one blurs it. In dim light, a photographer can open the aperture wider instead of leaving the shutter open longer.

Depth of field: what else stays sharp

The aperture changes more than brightness. The depth of field is how far in front of and behind the thing you focused on other things also look sharp. It is greater when the aperture is smaller (a bigger f-number). For example, with a wide opening like f/2, a camera can often get either the near things or the far things sharp, but not both.25

ISO: turning up the sensitivity

A camera has a third control, ISO. It sets how strongly the sensor's signal is boosted: a higher ISO makes a dim photo brighter, and in dim light the photo usually looks more grainy, which is called noise. Camera maker Nikon says that, in its experience, larger pixels give less noise than small ones.24

Film cameras: silver that remembers light

Before digital cameras, pictures were caught on film: plastic coated with tiny crystals of silver salts such as silver bromide. Where light hits a crystal, developing chemicals later turn it into dark metallic silver. That gives a negative, where bright things look dark, which is printed again to get the final picture.8

How does a digital camera sensor work?

A digital camera has a sensor where the film used to be: a silicon chip covered in a grid of millions of light-sensitive spots called pixels.15 Think of each pixel as a tiny bucket. When light hits the silicon, it knocks electrons loose, and the pixel collects them. More light means more charge.13 The camera measures each bucket and turns it into a number.15

Megapixels means millions of pixels. A 24.2-megapixel camera, for example, has a grid 6,016 pixels wide and 4,016 pixels tall.15

How a sensor sees colour: the Bayer filter

A pixel only measures how much light arrives, not what colour it is. So each pixel sits under a tiny colour filter: red, green or blue, arranged in a checkerboard called a Bayer pattern. There are twice as many green filters as red or blue ones.12 Half are green because the pattern was designed to mimic the human eye.14

After the shot, the camera's computer looks at each pixel's neighbours to estimate the two colours that pixel didn't measure. This step is called demosaicing, and it gives every pixel a full colour.14 The sensor chip can also handle jobs like exposure control and colour balance itself.12

How do phone cameras work?

A phone camera is the same dark box, only tiny: a small lens, an aperture, a shutter (usually electronic) and a sensor. The type of sensor almost all phones use, the CMOS active-pixel sensor, was invented by Eric Fossum at NASA's Jet Propulsion Laboratory in the early 1990s to build smaller, lighter cameras for space missions. By 2013, more than a billion were being made every year.17 Because phone lenses and sensors are so small, the phone's computer does a lot of work. Many phones use computational photography: they take a quick burst of photos and line them up and merge them, which can cut the grainy "noise" while keeping each shot short. Google's research team, for example, described HDR+ on its Pixel phones (2017) as merging a burst of 2 to 10 frames.1223

When was the first camera invented?

WhenWhat
5th century BCEMozi describes the pinhole image in a dark room2
Late 1500sDella Porta describes a camera obscura with a lens2
1827Niépce makes the oldest surviving camera photograph, "View from the Window at Le Gras", with an exposure that probably lasted hours, perhaps days181
1839Daguerre's process is announced in Paris; early exposures take 3 to 15 minutes19
1861First colour photograph, made through red, green and blue filters1
1972First filmless electronic camera patented15
Early 1990sCMOS image sensor invented at NASA's Jet Propulsion Laboratory17

Britannica dates Niépce's photo "1826 or 1827" and its exposure "hours or possibly days"; the Harry Ransom Center, which owns it, says 1827.118

Make a camera obscura at home

You can build the oldest camera in ten minutes.20

  1. Take a shoebox. Cut a square hole about 2 cm wide in the middle of one short end.
  2. Tape a square of aluminium foil over the hole and poke one small, neat hole in it with a pin.
  3. Tape white paper inside, on the opposite end: that's your screen.
  4. Cut a small viewing hole in a long side near the screen end.
  5. Point the pinhole at a brightly lit window or a sunny street and look through the viewing hole.

You'll see a dim, upside-down picture on the paper. Make the pinhole a bit bigger and watch it get brighter and blurrier. Safety: never look at the Sun, not through the pinhole and not directly.20

Common misconceptions

"The picture inside a camera is the right way up." The picture a pinhole or a camera lens makes on the back of the camera is upside down and swapped left to right. The camera or your brain sorts it out.28
"A smaller hole always gives a better picture." Smaller is sharper but dimmer, and too tiny blurs again. That's why we use lenses.45
"Every pixel sees full colour." With a Bayer filter, each pixel measures only red, green or blue. The computer fills in the rest.1214
"For a brighter photo, just keep the shutter open longer." Longer exposures blur anything that moves.10
"Cameras were invented in the 1900s." The dark-room idea is over 2,000 years old, and the oldest surviving camera photo is from about 1827.218

Why do red, green and blue filters make every colour? See how colour mixing works.

Curious what's inside the computer that stores your photos? See how computers work.

FAQ

How does a camera work, step by step?

1) Light bounces off the scene and travels in straight lines toward the camera. 2) The lens bends that light so each point of the scene lands as a sharp point, making an upside-down image. 3) The aperture sets how wide the opening is. 4) The shutter (a little mechanical door, or an electronic timer in most phones) lets light build up for a set time. 5) Film or a digital sensor records the light, and in a digital camera a computer turns it into a picture file.

How does a camera actually take a picture?

When you press the button, the camera lets light build up on the sensor for a set time, using a mechanical shutter or, in most phones, an electronic one. Each pixel collects electric charge in proportion to the light that hits it. The camera reads those numbers, works out the colours and saves them as an image.

How do cameras see what we see?

A camera and your eye work in a similar way: a lens makes an upside-down image on a light-sensitive surface. In the eye that surface is the retina; in a camera it's film or a sensor. The eye's pupil is its aperture. The sensor's red, green and blue filters copy the way our eyes sense colour. (That's a simplification: the eye and brain do a lot more processing than a camera.)

Why is the image in a camera upside down?

Light travels in straight lines. Light from the top of an object passes through the opening and carries on down, and light from the bottom carries on up, so the rays cross and the picture flips (left and right swap too). The camera's software or your brain turns it the right way up.

What is a camera obscura?

Latin for "dark room": a darkened room or box with a small hole in one side. Light through the hole paints an upside-down picture of the outside on the opposite wall. It was described more than 2,000 years ago and is the ancestor of the camera.

When was the first camera photo taken?

The oldest surviving photograph made in a camera is Nicéphore Niépce's view from his window at Le Gras in France, made in about 1827 (Britannica says 1826 or 1827). Its exposure probably lasted hours, perhaps days.

Are cameras always recording?

No. A camera only takes a photo when you press the button, and a video camera only saves video while it's recording. A security camera records continuously only if it's switched on and set up to save footage.

What is ISO on a camera?

ISO is how strongly the camera boosts the signal from its sensor. A higher ISO makes photos in dim light brighter, but usually grainier (more 'noise'). A lower ISO gives cleaner pictures but needs more light.

Is it safe to point a camera at the Sun?

No. Never look at the Sun, and never point a camera, phone or binoculars at it to look through. Strong sunlight can hurt your eyes and can damage a camera's sensor.

Did this help it click?

Sources

  1. Encyclopaedia Britannica, Camera
  2. Encyclopaedia Britannica, Camera obscura
  3. OpenStax Physics, 16.1 Reflection (light travels in straight lines)
  4. Encyclopaedia Britannica, Pinhole camera
  5. Exploratorium Science Snacks, Pinhole Magnifier
  6. Encyclopaedia Britannica, Lens
  7. OpenStax Physics, 16.3 Lenses
  8. Encyclopaedia Britannica, Technology of photography
  9. OpenStax College Physics 2e, 26.1 Physics of the Eye
  10. Encyclopaedia Britannica, Shutter
  11. Encyclopaedia Britannica, Relative aperture (f-number)
  12. Florida State University / Olympus Microscopy Primer, Introduction to CMOS Image Sensors
  13. Florida State University Microscopy Primer, Anatomy of a Charge-Coupled Device
  14. Wikipedia, Bayer filter (cross-checked with source 12)
  15. Encyclopaedia Britannica, Digital camera
  16. Florida State University Molecular Expressions, Human Vision and Color Perception
  17. NASA Spinoff 2017, CMOS Sensors Enable Phone Cameras, HD Video
  18. Harry Ransom Center, University of Texas at Austin, The Niépce Heliograph
  19. Library of Congress, The Daguerreotype Medium
  20. NASA Science, Eclipse Safety (pinhole projector box)
  21. Exploratorium Science Snacks, Giant Lens
  22. Encyclopaedia Britannica, Human eye: the retina
  23. Google Research blog, Introducing the HDR+ Burst Photography Dataset (company research claim)
  24. Nikon USA, Understanding ISO Sensitivity (camera maker's guide)
  25. Britannica (Students), Depth of field