← All articles
technologycamerasphotographyopticsSeptember 17, 20265 min read

How Does a Camera Work? A Hole, a Lens and a Decision About Light

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

Every camera ever built does one thing: it controls how much light reaches a surface, and for how long, and from what part of the scene. A pinhole in a dark box does it with no lens at all and produces a real image, which is the observation the whole technology grew from. Everything added since, the lens, the shutter, the aperture, the sensor, is a refinement of the same three decisions, and understanding them as three decisions rather than as settings is the difference between using a camera and operating one.

The exposure triangle

Three controls determine how bright the result is, and each has a side effect that is the reason to choose one over another:

  • Aperture, the size of the opening in the lens, measured in f-numbers where a smaller number means a wider opening. It controls brightness and, crucially, depth of field: a wide aperture throws the background out of focus and a narrow one keeps more of the scene sharp
  • Shutter speed, the duration for which light is admitted. It controls brightness and motion: a fast shutter freezes movement and a slow one blurs it, and below about a sixtieth of a second a handheld camera records the photographer's own shake
  • Sensitivity, historically the film speed and now the sensor gain, usually labelled ISO. Raising it allows a picture in less light and amplifies noise along with the signal, producing grain and colour speckling
  • The three trade against each other exactly: opening the aperture one stop, doubling the shutter duration or doubling the sensitivity each double the light, so the photographer chooses which side effect to accept
  • Every automatic mode is a rule for making that choice, with aperture priority letting you fix depth of field and shutter priority letting you fix motion

What the lens does

A pinhole produces an image because only a narrow bundle of rays from each point in the scene reaches the surface, which is why it is sharp everywhere and extremely dim. A lens does the opposite: it gathers a wide cone of light from each point and bends it back to a single point on the sensor, which makes the image far brighter at the cost of only one distance being in focus at a time. Focal length, the distance from the lens to the point where parallel rays converge, determines the angle of view, with a short focal length taking in a wide scene and a long one magnifying a narrow one. The perspective effects usually attributed to lenses are actually effects of where the photographer stands: a wide lens is used close, which exaggerates the difference in distance between near and far parts of a subject, and a long lens is used far away, which compresses it. Real lenses suffer from aberrations that a single piece of glass cannot avoid, which is why a modern lens contains a dozen or more elements of different glasses arranged to cancel each other's errors.

From film to sensor

Film records light chemically: silver halide crystals struck by photons form a latent image that development amplifies into visible metallic silver, with colour film using three layers sensitised to different parts of the spectrum. A digital sensor records it electrically, with each photosite accumulating charge in proportion to the photons that strike it during the exposure, and the charge read out and converted to a number. Because a photosite counts photons and cannot tell their colour, almost all sensors sit under a colour filter array, usually the Bayer pattern of one red, one blue and two green filters in each block of four, and the full colour of each pixel is reconstructed by interpolation from its neighbours, a process called demosaicing. That is why a raw file needs processing before it looks like a photograph and why the file contains more recoverable information than a finished image does.

The camera obscura and the chemistry

The optical principle is ancient. The camera obscura, a darkened room with a small hole projecting an inverted image of the outside onto a wall, is described by Mozi in China in the fifth century BC and analysed in detail by Ibn al-Haytham around 1020, and by the Renaissance it was a portable drawing aid, with an argument running since 2001 about how extensively painters including Vermeer used optical devices. What took until the nineteenth century was fixing the image chemically. Nicephore Niepce produced the earliest surviving photograph from nature around 1826 with an exposure of many hours. Louis Daguerre's process of 1839 produced a sharp unique image on a silvered plate and was announced as a gift to the world by the French government. William Henry Fox Talbot's competing process produced a negative from which any number of positives could be printed, which is technically the ancestor of everything that followed. George Eastman then made it a mass activity with roll film and a camera sold loaded, returned to the factory for developing.

Where the picture is made now

The most significant change of the last decade is that a phone photograph is less a recording than a computation. The optics are physically tiny and the sensor small, which should produce poor images, and the results are good because the device takes a burst of frames at different exposures the moment the shutter is pressed and before it, aligns them, combines them to extend dynamic range and reduce noise, applies learned models to sharpen and denoise, separates the subject from the background using depth data to simulate the blur a large lens would give, and adjusts colour and tone according to what the scene is judged to contain. This is computational photography, and it makes the question of what a photograph is evidence of considerably harder, since the image is an inference about the scene as much as a record of it. The same tools now generate content that was never in front of any lens, which is why provenance standards embedding a signed record of how an image was produced have moved from a technical curiosity to a serious proposal.

The takeaway

A camera controls how much light reaches a surface and for how long, through aperture, shutter speed and sensitivity, which trade against each other exactly and differ only in their side effects on depth of field, motion blur and noise. A lens gathers a wide cone of light to make a bright image at the cost of a single plane of focus, and the perspective effects credited to focal length are really effects of distance. Sensors count photons under a colour filter array and reconstruct colour by interpolation, and a phone image is now assembled computationally from many frames.

Practise this

The Technology track

How our gadgets, computers, code and the internet really work - from your first tap on a screen to programming, AI and cybersecurity, one tiny step at a time.

18 units and 2,148 questions, each with a written explanation. Every unit page shows what it covers and real example questions before you start.