Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

From Photons to Electron Counts

Chapter 1 established what sampling means mathematically. This chapter asks: what does the hardware physically do at each sample point? The answer involves photons, quantum mechanics, and irreducible randomness.


12.1 The Photosite

A camera sensor is a grid of photosites — tiny light-sensitive elements, one per pixel. Each photosite executes the sampling operation from Chapter 1 at its spatial location. During the exposure time it:

  1. Collects photons arriving from the focused scene

  2. Converts photons to electrons via the photoelectric effect (one photon → at most one electron)

  3. Accumulates electrons in a potential well until readout

  4. Reads out the charge as a voltage, then converts it to a digital integer via an ADC

The integer that emerges is the pixel value. It is a count of electrons — a proxy for the number of photons that arrived, which is itself a proxy for scene brightness.


22.2 Photon Counting Is Inherently Random

Photon arrivals are a Poisson process: independent random events occurring at some average rate λ\lambda (photons per second per photosite area). Even if the scene is perfectly uniform and the sensor is perfect, the count in any one exposure is random.

For a Poisson process with mean λ\lambda:

σ2=λσ=λ\sigma^2 = \lambda \quad \Rightarrow \quad \sigma = \sqrt{\lambda}

The standard deviation equals the square root of the mean. This is shot noise — not an instrument defect, but a fundamental consequence of the discrete nature of light.

Implication: even a perfectly flat, perfectly lit, perfectly uniform scene produces pixel values that vary from photosite to photosite. The variation scales as λ\sqrt{\lambda}.


32.3 Signal-to-Noise Ratio

Signal is the mean electron count SS. Noise has two contributions:

Total noise in quadrature:

SNR=SS+σr2\text{SNR} = \frac{S}{\sqrt{S + \sigma_r^2}}

At high signal (Sσr2S \gg \sigma_r^2) this simplifies to:

SNRS\text{SNR} \approx \sqrt{S}

Doubling the signal improves SNR by 241%\sqrt{2} \approx 41\%.


42.4 Key Sensor Parameters

ParameterSymbolTypical phoneTypical DSLREffect
Photosite areaAA~1 µm²~25 µm²Larger → more photons → higher SNR
Full-well capacityCC~1,000 e⁻~50,000 e⁻Maximum before saturation
Read noiseσr\sigma_r~3 e⁻~5 e⁻Noise floor
Quantum efficiencyQE0.4–0.60.5–0.8Fraction of photons → electrons

Mean electron signal: S=ϕAQEtexpS = \phi \cdot A \cdot \text{QE} \cdot t_{exp} where ϕ\phi is photon flux and texpt_{exp} is exposure time.


52.5 Phone vs DSLR — Why Sensor Size Matters

A DSLR photosite is roughly 25× larger than a phone photosite. Same scene, same exposure time → DSLR collects 25× more photons → SNRDSLR5×SNRphone\text{SNR}_{DSLR} \approx 5\times \text{SNR}_{phone}.

This is not about optics quality or processing — it is pure geometry. A larger bucket catches more rain.

ConditionPhoneDSLR
Bright daylightGoodGood
IndoorNoisyAcceptable
NightVery noisy (SNR ≈ 1)Usable

Critical consequence for computer vision: pixel values from a phone and a DSLR of the same scene are not numerically comparable, even at the same exposure settings. The pixel value encodes sensor physics, not just scene brightness.


62.6 The Pixel Value Equation

pixel value=f ⁣(ϕAQEtexp+σr+σdark)\text{pixel value} = f\!\left(\phi \cdot A \cdot \text{QE} \cdot t_{exp} + \sigma_r + \sigma_{dark}\right)

where ff is the ADC mapping and σdark\sigma_{dark} is dark current noise. Every term except ϕ\phi (photon flux from the scene) is a camera-specific nuisance. Two cameras imaging the same scene produce different pixel values — not because the scene differs, but because their hardware parameters differ.

This is the root of the problem explored in Chapter 6.

Sensor types — CCD vs CMOS photosite structureNoise averaging — a galaxy image improves with more exposures stacked

Run: uv run python tutorials/00_introduction_to_digital_images/part2_sensor_physics.py to generate SNR vs brightness curves and the shot noise simulation.


7Summary

ConceptKey fact
PhotositeConverts photons to electrons; one per pixel
Shot noiseσ=S\sigma = \sqrt{S} — irreducible, from photon statistics
SNRS\approx \sqrt{S} at high signal; bigger photosite = higher SNR
Full-well capacityMax electrons before saturation = white clipping
Pixel valueEncodes scene brightness + sensor physics + noise

Next → Chapter 3 — Pixels: the sensor produces a grid of integers — what does that grid mean, and what are its limits?