Camera Capture Timing
How the camera server schedules captures, and what latency to expect between a control request and the start of exposure.
The Sensor Free-Runs
Once configured, the image sensor streams continuously at its configured frame rate; at 30 fps a new frame starts every 33.3 ms. Capture requests do not start an exposure directly. Each request is submitted into the camera pipeline, latches at an upcoming frame boundary, and takes effect 2 to 3 frame intervals later. At 30 fps this puts a floor of roughly 67 to 100 ms (typically ~84 ms) between submitting a request and the start of the exposure it produces.
Scheduling Fields
CameraControl.schedule has two fields:
period: interval for periodic capture. The server submits a capture request everyperiodnanoseconds.snapshot_target: absolute time for a single capture.
snapshot_target controls when the capture request is submitted to the
camera pipeline, not when exposure starts. Submission accuracy is better
than a millisecond; the pipeline latency described above then applies before
exposure begins.
Control Message Pickup
The camera server polls for new control messages on a 100 ms cycle. Set
snapshot_target at least 100 ms in the future when you send the control
message; closer targets are picked up late, adding delay on top of the
pipeline latency.
Jitter
Because requests latch onto the sensor’s frame boundaries, the delay between
snapshot_target and the start of exposure varies by up to half a frame
interval, depending on where the target lands relative to the frame grid.
Repeated captures at a fixed period can appear to have very low jitter; that
is the capture spacing phase-locking to the frame grid, not sub-millisecond
control of exposure start.
Controlling Exposure Start Precisely
If you need exposure to start at a precise time, use external triggering:
the sensor exposes on a hardware trigger pulse instead of free-running. Set
external_trigger: true for the camera in camera_server_config.json (see
Configuring GMSL Cameras) and follow the
External Trigger tutorial. The trigger
pulse can also be generated from software via GPIO, as the tutorial’s active
mode demonstrates.