From Photons to a File
A sensor is a grid of photosites. Each photosite counts photons and returns a number.
Three steps convert this count into an image:
- A colour filter array. Photosites cannot detect colour. Most sensors use a Bayer array, created for Kodak by Bryce Bayer. Half the filters are green, while red and blue each take a quarter.
- Demosaicing. Every final pixel needs three colours. Two-thirds of colour values are interpolated from neighbours.
- Quantisation. The analogue count converts to a digital integer.
| Bit depth | Levels per channel |
|---|---|
| 8-bit | 256 |
| 12-bit | 4096 |
| 14-bit | 16384 |
Linear Encoding
Raw sensor data is linear. Doubling the light doubles the recorded value.
In a 14-bit File, the brightest stop takes 8192 levels. The next takes 4096. Exposing to the right preserves far more data.
Raw vs JPEG
| Feature | Raw | JPEG |
|---|---|---|
| Bit depth | 12 or 14 | 8 |
| Colour | One value per site | Three values per pixel |
| Processing | Unbaked metadata | Baked in irreversibly |
Print Output
A standard hand-held Print requires about 300 ppi.
A 6000 by 4000 pixel file prints at 20 by 13.3 inches at 300 ppi. A 16 by 24 inch print needs more pixels.
Common pitfall: treating megapixels as a measure of quality. A 24 megapixel phone file differs hugely from a 24 megapixel full-frame file. Pixel count sets maximum print size, not image fidelity.