Every digital photograph begins as a storm of individual particles of light striking a slab of silicon. From there, physics, electronics, and software take over in sequence, ending in either the flexible, unprocessed data of a RAW file or the finished look of a JPEG. This article walks the whole chain — photon capture, charge storage, colour filtering, readout, digitization, and encoding.
Photons Become Electrons
An image sensor is covered in millions of tiny light-sensitive cells called photosites. Each contains a photodiode: a specially doped region of silicon that catches photons and converts them into electrical charge through the photoelectric effect.
Silicon's bandgap is roughly 1.1 electron-volts, so any photon arriving with more energy than that threshold can knock a bound electron out of the crystal lattice. That liberated electron is your signal — but not every photon succeeds. The fraction that produces a measurable charge carrier is called quantum efficiency (QE), a headline specification of every sensor. Microlenses that funnel light into each photodiode and anti-reflection coatings both push QE higher. Wavelength matters too: blue light is absorbed near the surface while red penetrates deeper, so the light-collecting region must be deep enough to catch long-wavelength photons.
The Photosite as a Bucket
Freed electrons are swept into the photodiode's potential well, which accumulates them like a bucket collecting rain. The maximum number of electrons one photosite can hold — its full-well capacity — is the hard ceiling on how much light it can record. When the bucket overflows, extra photons cannot be recorded at all: highlights clip to pure white, and no detail exists there to recover, in RAW or in JPEG.
Full-well capacity tracks physical photosite size, so larger photosites generally deliver better highlight handling — typical values run into the tens of thousands of electrons, while small phone-sized photosites hold far fewer. The ratio between a full well and the smallest detectable signal sets the sensor's dynamic range, making full-well capacity a dynamic-range specification in disguise.
Two unwanted signals compete with the real one. Dark current is a slow trickle of electrons that thermal energy liberates even in complete darkness, masquerading as light; it roughly doubles with every 10°C of temperature rise, which is why serious astrophotography cameras are actively cooled. Read noise is random fluctuation from the amplifier and readout circuitry itself. Sensor design balances minimizing read noise against maximizing conversion gain — the voltage produced per electron, measured in microvolts per electron. More gain lifts faint shadow signals above the noise floor, but the voltage ceiling is reached sooner, so dynamic range shrinks.
Colour From Colour-Blind Pixels
A photodiode counts photons; it cannot tell red from blue. To record colour, almost every camera covers its sensor with a colour filter array — a mosaic of microscopic red, green, and blue filters, one per photosite, so each photosite measures only one colour of light.
The dominant design is the Bayer filter, invented by Bryce Bayer at Eastman Kodak and patented in 1975. It tiles the sensor with a repeating 2×2 cell — one red, one blue, and two green filters (RGGB) — making the mosaic 50% green, 25% red, and 25% blue. Green gets double representation because human vision is roughly twice as sensitive to green, and the green channel ends up carrying most luminance detail.
A full-colour image must therefore be reconstructed by demosaicing: estimating the two missing colour values at every photosite from its neighbours. Production algorithms use gradient-directed interpolation that follows the direction of edges rather than smearing across them, preserving fine detail. Poor demosaicing shows up as zipper-like artifacts along high-contrast edges, false colours on fine patterns, and moiré — which the tiny anti-aliasing filter in front of many sensors exists to suppress.
Fujifilm's X-Trans sensors use a larger, irregular 6×6 pattern designed to resist moiré without a physical blur filter, and Sigma's Foveon sensors skip the mosaic entirely, stacking three photodiode layers at different depths. But for the vast majority of cameras, the Bayer mosaic plus demosaicing is how colour comes to exist at all.
CCD, CMOS, and Modern Variants
In a CCD (charge-coupled device), charge packets are shuffled across the chip in a bucket brigade, row by row, to a single readout node and amplifier. Because every packet must survive hundreds of transfers intact, manufacturing demands near-perfect charge-transfer efficiency — one reason CCDs were expensive and slow to scale.
In a CMOS sensor — the active-pixel-sensor design that dominates today — each photosite has its own tiny amplifier converting its charge to a voltage right at the pixel. Readout is massively parallel, far faster, and much less power-hungry, which is why CMOS displaced CCD in nearly all applications.
Front-Illuminated vs Back-Illuminated
Early CMOS sensors were front-illuminated: wiring and transistors sat on top of the photodiode, between incoming light and the light-sensitive silicon. In a back-illuminated (BSI) sensor the wafer is thinned and the circuitry moved behind the photodiode, so photons reach the silicon first. The technique lived in expensive specialist cameras until OmniVision shipped the widely used OV8810 in 2008, followed by Sony's consumer “Exmor R” BSI sensor in August 2009, which Sony reported as roughly doubling low-light performance. The next refinement was the stacked sensor: the pixel layer is bonded directly atop a separate logic layer holding the readout and signal-processing circuitry, freeing more area for light capture and enabling the fast readouts behind silent electronic shutters and high frame rates.
From Voltage to Numbers
The image now exists as a field of tiny analog voltages — one per photosite. An analog-to-digital converter (ADC) turns each voltage into an integer, and this is where bit depth matters. A 12-bit ADC maps the voltage range to 4,096 discrete levels; a 14-bit ADC maps it to 16,384. Each extra bit halves the smallest representable step, preserving smoother gradients and shadow detail. The cost is speed: as a rough rule of thumb, each additional bit roughly doubles readout time, which is one reason phones — built for speed and computational photography — commonly digitize at 10 bits while full-frame cameras typically use 14.
ISO lives in this stage, and it is not what most people think. The sensor has one native sensitivity — its base ISO, often 100 or 200. Raising ISO applies analog gain to the voltage before digitization, brightening the signal while amplifying the noise with it. Many modern sensors are dual-gain designs: partway up the ISO range the sensor switches to a second, lower-noise analog gain circuit — effectively a second base ISO — so shooting at that higher ISO is cleaner than digitally brightening a base-ISO exposure. Below base ISO, the camera generally records base-ISO data and darkens the preview, risking clipped highlights in the RAW data — the reason “extended low” ISO settings are best avoided.
The last quiet step is black-level subtraction: every pixel reports a small non-zero signal in darkness from dark current and circuit offsets, varying slightly across the sensor in a fixed pattern. The camera measures that floor and subtracts it, removing fixed-pattern noise that would otherwise tint shadows.
What a RAW File Really Contains
After the ADC, the camera holds exactly one number per photosite — a single colour channel, linear with respect to light. That is what goes into a RAW file: the un-demosaiced, un-white-balanced, un-sharpened sensor data, plus metadata (camera, lens, exposure settings, white-balance coefficients, black level) and a small embedded JPEG preview.
No rendering decisions have been made. White balance is stored as a suggestion, not applied. The linear data has not been bent into the perceptual tone curve our eyes expect. No sharpening, noise reduction, or colour profile is baked in. That is what makes RAW flexible: you start from the measurement, not from someone else's interpretation of it.
A JPEG, by contrast, is the end of a long render pipeline: demosaicing to full RGB at every pixel, white-balance scaling, lens corrections, a gamma/tone curve remapping the linear data into the non-linear way human vision perceives brightness, sharpening, conversion to 8 bits per channel, and lossy compression. Each step is a decision you can no longer unmake. RAW defers all of them to you.
The Full Pipeline, in One Glance
- Photons strike the sensor; those with enough energy knock electrons free in the silicon (quantum efficiency).
- Electrons accumulate in each photosite's potential well, up to its full-well capacity.
- The Bayer colour filter ensures each photosite records only red, green, or blue.
- CMOS amplifiers convert each photosite's charge to a voltage in place.
- Analog gain (ISO) is applied, then the ADC digitizes the voltages — 12 or 14 bits per photosite.
- The black level is subtracted; the numbers are written to the RAW file with metadata.
- Later — in-camera for JPEG, in software for RAW — demosaicing, white balance, tone curves, and sharpening turn the measurements into a viewable image.
Once you see the camera as this chain — photon, electron, voltage, number, interpretation — the jargon stops being jargon. Bit depth is how finely the voltage is sliced, ISO is the analog gain applied before the slice, and RAW is the sliced numbers before anyone interprets them.
Further reading
- Operating principle and features of CMOS sensors — Baumer on full-well capacity, saturation, and the photoelectric basics.
- Back-illuminated sensor — BSI technology and its adoption history, from OmniVision to Sony's Exmor R.
- Camera phone image processing “magic,” revealed! — EE Times on the CFA mosaic, demosaicing, white balance, and sensor noise sources.
- How to measure CCD and CMOS image sensor qualities — EE World on CCD vs CMOS readout and sensor characterization.






