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!
Your turn
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.
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!
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.
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.
The dog is running. Make the photo bright AND sharp.
Trade f-stops against shutter time: same exposure, different motion blur.
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!
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!
A camera is a dark box that catches light. Light comes in through a small hole and makes a picture inside.
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.
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.
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!
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.
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).
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
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.
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.
A pinhole camera has no lens at all, just a tiny hole.4 The hole size is a trade-off:
| Hole | Brightness | Sharpness |
|---|---|---|
| Tiny | Dim: little light gets in | Sharp (until it's so tiny that light spreads out, called diffraction) |
| Big | Bright | Blurry: 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.
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
| Job | Camera | Your eye |
|---|---|---|
| Dark box | Camera body | Eyeball |
| Focus light | Lens (moves to focus) | Cornea + lens (changes shape to focus) |
| Control light | Aperture | Iris and pupil (about 2 to 8 mm wide) |
| Record light | Film or sensor | Retina, with roughly 80 to 155 million rods and cones |
| Colour | Red, green and blue filters | Cone 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.
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.
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.
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.
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
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
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
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
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
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 | What |
|---|---|
| 5th century BCE | Mozi describes the pinhole image in a dark room2 |
| Late 1500s | Della Porta describes a camera obscura with a lens2 |
| 1827 | Niépce makes the oldest surviving camera photograph, "View from the Window at Le Gras", with an exposure that probably lasted hours, perhaps days181 |
| 1839 | Daguerre's process is announced in Paris; early exposures take 3 to 15 minutes19 |
| 1861 | First colour photograph, made through red, green and blue filters1 |
| 1972 | First filmless electronic camera patented15 |
| Early 1990s | CMOS 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
You can build the oldest camera in ten minutes.20
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
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.