Trigger Latency Compensation

From edgertronic high speed video camera
Jump to navigation Jump to search

There is always a latency, a time delay, between when an event occurs, when the event is detected as occurring, and more latency until the camera is triggered to capture the event. For some environments, the latency is fixed for all captures. For other environments, the latency changes from one capture to the next capture.

Trigger latency example, if you are using a radar to trigger the camera, there is a delay in measuring the speed of an object, such as a baseball, that is used to trigger the camera when the speed exceeds a threshold.

Trigger event

The camera uses the trigger event for three purposes:

  1. Switching from capturing pre-trigger frames to capturing post-trigger frames.
  2. Assigning frame 0 to the trigger frame, and numbering the other captured frames accordingly.
  3. Capturing a time-of-day trigger time to store in the metadata file.

Latency compensation limitations

The following cannot be modified as part of dynamic latency compensation:

  • The size of the capture buffer reserved for a capture,
  • The number of frames in the pre-trigger portion of the buffer, and
  • the point in time the trigger was received by the camera.

What can be modified is the captured frame that is considered the trigger frame; frame 0, and the time-of-day the trigger occurred.

The obvious limitation in latency compensation is the size of the pre-trigger portion of the capture buffer needs to be sized for the desired pre-trigger time plus the worse case (longest) latency time. This is necessary because the capture buffer size and the portion for pre-trigger frames can not be changed after frame capture has started.

Specifying latency

There are 3 possible ways to specify latency:

  1. If the latency is fixed and measurable, it might be convient to think of latency it terms of a time difference.
  2. If the latency is dynamic, then it might be convenient to capture the actual time the event occurred. Latency is the difference between camera trigger time and the event time.
  3. If you have a warped viewpoint, such as the camera software engineering writing this wiki, you could think of latency in terms of frame count. This of course is just the latency time times the frame rate. The frame count is used to move what is considered the trigger frame, frame 0.

Latency compensation

In all approaches to latency compensation, the size of the pre-trigger portion of the capture buffer needs to be sized for the desired pre-trigger time plus the worse case (longest) latency time.

Post video save latency compensation

Once the event is over and all the data has been captured, latency compensation is done

Post capture latency compensation

Old version of the page


You can compensate for a latency (delay) between when the event of interest occurs and a later point in time when the camera is triggered, if you know the length of the delay.

Since the edgertronic camera supports a pretrigger buffer capturing frames before the trigger occurs, the camera creates a video of all the event details. However, a side effect of trigger latency is


  • Event - the time during the action that indicates the action is of interest and should be captured
  • Trigger - the time at which the camera is triggered
  • Latency - the delay between the event and the trigger


Assume you trigger using a radar that has 700ms of latency. Further assume you want 100ms capture before the event and 100 ms capture after the event. Since the 700ms latency is larger than the 100ms post-event you want to capture, there will be 600ms of video after the duration of interest.

This feature has not been implemented. We added manual save mode to accomplish the same functionality.

Trigger latency compensation allows you to discard (trim) frames from the capture so you are not forced to save a portion of video that is always uninteresting.