On this page
When you take a photo on a dimly lit street, your smartphone often produces an image that looks brighter and clearer than what you see with your own eyes. It does this not by changing the laws of optics, but by using computational photography.
Why is a single long exposure a problem?
Light travels as tiny packets of energy called photons. In low-light environments, very few photons reach the camera sensor. To gather enough light for a bright photo, a traditional camera opens its shutter for a longer duration—often a full second or more.
The problem with a long exposure on a smartphone is that your hands are never perfectly still. Even the slight tremor of your breathing will smear the incoming photons across different pixels, resulting in a blurry image. If you do not have a tripod to lock the phone in place, a single long exposure is practically useless.
How does night mode combine multiple frames?
Instead of taking one long, blurry photo, your phone captures a rapid burst of many short photos. According to Google Research, the camera typically captures up to 15 frames in a matter of seconds. Each individual frame is exposed for just a fraction of a second—up to 333 milliseconds when the phone is held by hand. This brief exposure time is fast enough to freeze the motion of your shaking hands, ensuring that the foundational images are reasonably sharp.
However, capturing the frames is only the first step. Once the burst is complete, the phone's processor has to stitch them together. Because your hands inevitably moved slightly between each shot, the 15 frames do not line up perfectly. The software identifies distinct anchor points across the images, such as the sharp edge of a building, a bright window, or the contour of a street sign. It then mathematically shifts, rotates, and warps each frame so that the main subjects overlap exactly.
If something in the scene was actively moving while you took the photo—like a person walking across the street or leaves blowing in the wind—the software uses optical flow algorithms to detect that motion. It will often discard the misaligned pieces of those frames to prevent ghosting, ensuring the final image remains crisp.
The math of noise reduction: why average?
When you take a photo in the dark with a short shutter speed, the resulting image appears very grainy. This grain is digital noise. It is caused by the uneven, random arrival of photons and the electrical interference generated by the camera sensor itself.
This is where the computational technique of multiple exposures happens. Because digital noise is a completely random variable, its pattern changes in every single frame of the burst. The true colour and brightness of the brick wall or the parked car, however, stay exactly the same. By digitally stacking the frames and taking the mathematical average of every single pixel, the random noise effectively cancels itself out.
The physics behind this averaging process follows a strict mathematical rule explained by Google Research: the signal-to-noise ratio improves by the square root of the total number of frames captured.
If you are preparing for physics exams or studying the photon nature of light, you might have calculated the number of photons emitted per second by a lamp or a laser. Understanding light as individual, randomly arriving particles makes it much easier to picture why sensor noise happens in the first place, and why gathering more samples solves the problem.
How does the AI fix the colour?
Getting a sharp, noise-free image is not the end of the process. In extreme low light, traditional auto-white-balance algorithms often fail completely. Artificial night lights, such as yellow sodium street lamps or blue neon signs, cast a heavy tint over the entire scene. A traditional camera sensor would faithfully record this as a muddy, monochromatic orange or blue wash, losing the natural colours of the environment.
To fix this, modern smartphones pass the final averaged image through a neural network. This artificial intelligence has been trained on a diverse set of "before and after" examples of low-light scenes. It analyses the lighting conditions and essentially guesses what the true colours of the objects should be, correcting the white balance so the scene looks closer to how it would appear in natural daylight, while still retaining a nighttime feel.
When you study optics, wave interference or the behaviour of light through a glass prism, the concepts can be difficult to visualise from a static textbook diagram. The Fermi Simulation Lab provides interactive simulations for the ideas that are easier to see than to read. Running your own virtual experiments helps bridge the gap between the mathematics of light and the computational techniques happening in your pocket.



