Skip to content

Sensor and ISP

The sensor and ISP stages are interfaces with ideal pass-through defaults today; noise, response and demosaicing models plug in here.

base

Sensor model interface.

SensorModel

Converts optical irradiance on the sensor into a raw sensor image.

IdealSensor

Bases: SensorModel

Noise-free, unquantized sensor: raw = irradiance * exposure, clipped to [0, 1].

base

ISP model interface.

ISPModel

Converts a raw sensor image into the camera's output image.

IdentityISP

Bases: ISPModel

Pass-through ISP: output equals raw.

color

Color encodings.

Optics and sensor models act on linear light. Simulators such as MuJoCo output display-encoded 8-bit images, so adapters linearize before the optics and re-encode afterwards. Treating MuJoCo's shading as sRGB-encoded radiance is an approximation: its lighting is not radiometric.

srgb_to_linear

srgb_to_linear(x: Tensor) -> Tensor

sRGB-encoded values in [0, 1] -> linear (IEC 61966-2-1).

linear_to_srgb

linear_to_srgb(x: Tensor) -> Tensor

Linear values -> sRGB encoding in [0, 1] (clipped).