A digital camera, whether a dedicated model or the one in your phone, does a deceptively simple job: it records the light coming from a scene and converts it into numbers that can be stored as an image.
Key takeaways
- A lens focuses light onto an image sensor.
- The sensor is covered with millions of tiny light-sensitive pixels.
- Colour comes from a filter pattern that is later interpreted by software.
- Aperture, shutter speed and ISO together control exposure.
- Phones rely heavily on software processing to improve small sensors.
The lens
Light from the scene enters through a lens, a set of curved glass or plastic elements that bend light so it forms a sharp image on the sensor. Moving some elements changes focus, and in zoom lenses, changes the field of view. Lenses also correct for flaws such as colour fringing and distortion.
The image sensor
Behind the lens sits an image sensor, usually a CMOS chip. It contains millions of photosites, one for each pixel. When light hits a photosite, it releases electrons in proportion to how much light arrives. The camera measures this electrical charge and converts it into a digital number. A bright area produces a high value and a dark area a low value.
Getting colour
Photosites only measure brightness, so colour is added with a mosaic of red, green and blue filters laid over the sensor, commonly in a Bayer pattern with twice as many green filters as red or blue, reflecting the eye's sensitivity to green. Each pixel therefore records only one colour. The camera's processor estimates the missing colours for each pixel by looking at neighbouring ones, a step called demosaicing.
The exposure triangle
Three settings control how much light is captured:
- Aperture is the size of the opening in the lens. A wider opening lets in more light and produces a shallower depth of field, where the background is blurrier.
- Shutter speed is how long the sensor is exposed. Fast speeds freeze motion, while slow speeds let in more light but can cause blur.
- ISO amplifies the sensor signal. Higher ISO brightens an image in low light but can add visible noise.
Changing one setting usually means adjusting another to keep the same overall brightness.
Processing and file formats
After capture, the camera's processor adjusts white balance, reduces noise, sharpens and compresses the image into a format such as JPEG. Many cameras can also save RAW files, which keep more of the sensor data for editing later.
Phone cameras
Phone sensors are tiny, so they capture less light than larger camera sensors. Phones compensate with computational photography, combining several frames, adjusting brightness in different parts of the image and applying software effects such as portrait blur. This gives surprisingly good results but means the final picture is partly an interpretation.
Sensor size and image quality
Sensor size is one of the biggest factors in image quality. A full-frame sensor measures about 36 by 24 millimetres, the same as a frame of traditional 35 millimetre film. Smaller formats include APS-C, which is roughly a third smaller in each dimension, and Micro Four Thirds. Compact cameras and phones use much smaller sensors. A larger sensor can gather more light per pixel, which usually means less noise in dim conditions and a wider range of tones, and it allows shallower depth of field. Phones overcome their small sensors with software and sometimes by using multiple lenses.
Lenses: focal length and aperture
Focal length, measured in millimetres, controls the field of view. A short focal length, such as 24 millimetres, gives a wide view for landscapes and rooms. A long one, such as 200 millimetres, magnifies distant subjects like wildlife. The aperture is shown as an f-number, such as f/1.8 or f/8. A lower number means a bigger opening, which lets in more light and blurs the background more, while a higher number gives more of the scene in focus. Good lenses matter as much as the camera body, which is why photographers often keep lenses for years.
Dynamic range and RAW files
Dynamic range is the span between the darkest and brightest parts of a scene a camera can record at once. Bright skies and deep shadows in the same picture can exceed what a sensor holds. A RAW file stores the sensor data with minimal processing, so you can recover more detail in highlights and shadows and adjust white balance when editing. JPEG files are smaller and ready to share, but they discard information. Many photographers shoot RAW when quality matters and JPEG for convenience.
How autofocus works
Cameras use several autofocus methods. Contrast detection adjusts the lens until the image has maximum contrast, which is accurate but can be slow. Phase detection compares light arriving from two sides of the lens to work out in which direction and how far to focus, which is fast and good for moving subjects. Modern cameras combine them and add subject tracking, where software recognises faces, eyes, animals or vehicles and keeps them in focus.
Computational photography
Phones increasingly rely on software. HDR modes combine several exposures to keep detail in highlights and shadows, night modes stack multiple frames to reduce noise, and portrait modes estimate depth to blur backgrounds. These techniques can produce striking results from tiny sensors, but they also mean that the final image is partly constructed, so details may differ from what a single exposure would record.
Frequently asked questions
What does a bigger sensor do?
It collects more light per pixel, which typically improves low-light quality and allows a shallower depth of field.
Are more megapixels always better?
Not necessarily. Image quality also depends on sensor size, lens quality and processing.
What is autofocus?
A system that measures contrast or phase differences to move lens elements until the subject is sharp.
What does the f-number mean?
It describes the size of the lens opening relative to the focal length. A smaller number, such as f/2, means a wider opening, more light and a blurrier background. A larger number, such as f/11, means a narrower opening and more of the scene in focus.
Do megapixels matter for printing?
Somewhat. A 12 megapixel image can print well at large sizes for normal viewing distances, and more megapixels allow bigger prints or heavier cropping. Beyond that, sensor quality, lens and technique usually matter more than pixel count.
Should I shoot RAW or JPEG?
RAW gives more flexibility when editing but uses more space and needs processing. JPEG is convenient and consistent. If you enjoy editing or shoot difficult light, RAW is worth trying, and many cameras can save both at once.
Sources and further reading
Written by
FactNest Editorial Team
FactNest is operated by Muonix. The FactNest Editorial Team publishes general-interest explainers with AI-assisted drafting and illustrations. Contact contact@muonix.co for questions or corrections; we respond within 2 business days.
More from this author →


