// 04 RESTRICTED
panopticon
Surround-view stitching for cameras with any lens. Give it N cameras, their rough mounting poses on a vehicle and a calibration pass, and it renders any number of virtual cameras from them: a bird's-eye view, a 3D orbit, pan, tilt and zoom for each camera, a 360° panorama, or an undistorted view in any projection. The NumPy renderer is the specification, a WGSL shader matches it on Metal, and the browser viewer runs that same shader on WebGPU.
How it works
For every output pixel the renderer casts a virtual ray and intersects it with a projection surface: the ground, a bowl or a sphere. The hit point is projected into every physical camera that can see it, and the views are blended by a softmax over how central each camera sees it. Seven lens models cover the ideal pinhole, Kannala–Brandt fisheye, Brown–Conrady and a table read from a datasheet, including a 200° lens. The shader is held to the reference by parity tests over seven view types, on a four-camera rig and a six-camera rig with mixed lenses.
Calibration
It starts from the tape-measured mounts and refines them, with four methods:
- Ground targets: ChArUco mats on the ground, detected on top-down rectified patches and mapped back to the raw pixels, with the mats' placement solved too.
- Clicked marks: the installer clicks checker corners in each image, and each click snaps to its sub-pixel corner.
- Targetless: SIFT matches in the overlap zones, with ground-plane transfer residuals, then a photometric refinement.
- Gains: per-camera RGB multipliers from how well the overlaps agree.
Lens intrinsics are fitted from board images or from a datasheet table.
Verified so far
All on synthetic data with known ground truth:
- Ground-target calibration on both demo rigs lands within 0.02–0.08° and 0.5–1.2 cm of the truth.
- Targetless calibration, starting 1.8–4.2° and 2–7 cm off on four cameras, closes a 97 cm seam gap to 0.25 cm.
- The shader matches the NumPy reference to a mean error of about 0.2 of 255 on the views checked.
- Photometric gains recover injected per-camera gains to within 2%.
- A Kannala–Brandt fit from 15 board views of a fisheye has a 0.09 px RMS residual.
Stated honestly
Everything is synthetic so far. There is no real camera data, so real lenses, exposure and mounting error will show first in the calibration residuals. Calibrate at full resolution: at half resolution the ChArUco cells are too small for the side cameras to decode. Targetless and gains are only tested on the four-camera rig, and on plain pavement they may not converge. The bowl surface ghosts tall objects such as posts and people in the overlap zones, and a depth-adaptive surface is not built. Live capture from USB, RTSP or AHD is not built either, so the viewer plays stills and files. The viewer needs WebGPU and has only been run on Metal, and its click-to-calibrate UI has not been driven end to end with real clicks.