POST 03 / 07CAMERA HARDWARE~14 min read

Camera Hardware: Optics → Sensor → Wire

Light enters as photons. Exits your robot as a 10-Gigabit-per-second packet stream. Three big stages decide everything in between: optics shape the photons, the sensor turns them into bits, and the link moves those bits to compute. Six interactive visualizers — geometry, lens artifacts, exposure, bit-depth, Bayer demosaic, link budget.

Nishanth Vanipenta2026.05.01Interactive · 6 viz

Stage 1 · Optics — shaping the photons

The lens decides three things before the sensor ever sees light: field of view, depth of field, and how much light gets through. The classic equation:

FOV = 2 · atan( sensor / (2 · f) )

Visualizer · lens geometry & depth of field

VIZ_03A :: LENS_GEOMETRY—
Focal length 35 mm
Aperture (f-stop) f/2.8
Focus distance 3.0 m
Sensor size

Lens artifacts — what real glass does to your image

The pinhole model is a lie. Real lenses introduce:

Calibration software (OpenCV, Kalibr) recovers all of this from a checkerboard sequence and produces an undistortion map you apply per pixel.

Visualizer · radial distortion & CA

Drag the distortion slider to barrel- or pincushion-warp a checkerboard. Add chromatic aberration to see how RGB channels separate at the edges.

VIZ_03B :: LENS_DISTORTION—
DISTORTED (sensor sees)
UNDISTORTED (calibrated)
k₁ (radial) 0.30
Chromatic aberration 0.5
Vignetting 0.4
Pattern

Stage 2 · Exposure — three knobs, one EV

Once you've chosen a lens, three controls decide image brightness:

Each "stop" doubles or halves the light. f/2.8 → f/4 = ½ light; 1/125 → 1/250 = ½ light; ISO 200 → 100 = ½ light. To keep the same exposure, give one stop and take one elsewhere.

Visualizer · exposure triangle

VIZ_03C :: EXPOSURE_TRIANGLEEV = 0
EV0 Aperturef/2.8 Shutter1/125 ISO200 ResultOK
Aperture f/2.8
Shutter 1/125
ISO 200

Stage 3 · Sensor — photons to bits

Photons hit silicon → photoelectrons (charge) → voltage → ADC integer → pixel.

pixel = (electrons / well_capacity) × (2bits − 1)

Visualizer · electrons to pixel

VIZ_03D :: ELECTRONS_TO_PIXEL—
Electrons collected 2000
Well capacity 5000
Bit depth

The Bayer mosaic

Color sensors put a Bayer filter over the pixels: R, G, G, B in a 2×2 tile (RGGB). Each pixel sees only one color. The other two are reconstructed from neighbors via demosaicing. Twice as many green pixels because human vision is most sensitive to green — the same reason the grayscale formula is 0.299R + 0.587G + 0.114B.

Monochrome sensors drop the Bayer filter entirely. Every pixel sees every photon. Result: better SNR, sharper edges, no demosaic artifacts. For machine-vision inspection where color isn't needed, mono is almost always the right call.

Visualizer · Bayer mosaic & demosaic

VIZ_03E :: BAYER_DEMOSAICRGGB
SCENE
RAW BAYER
DEMOSAICED
Zoom into pattern 3×
Display

Stage 4 · The wire — bandwidth math

bytes/sec = W × H × bytes_per_pixel × fps

A handful of reference points:

Protocols at a glance: USB 3.0 Vision (5 Gb/s, 3 m), GigE Vision (1 Gb/s, 100 m), 10 GigE, CoaXPress (6.25 Gb/s on coax, 100 m+), MIPI CSI-2 (on-board only).

Field rule: compress only what humans will look at. Anything feeding an algorithm should travel raw or losslessly compressed. Lossy compression silently destroys sub-pixel precision in calibration, edge detection, and HDR fusion.

Visualizer · link budget

VIZ_03F :: LINK_BUDGET—
Resolution
Color mode
Frame rate 30 fps
Cameras on link 1
Compression
Transport
Raw / camera— After compression— Total (× cameras)— Link capacity— Utilization— Verdict—

Sources & further reading

← Image Filters 03 / 07 Next: Projection →