Synchronizing Ladybug Cameras
This application note describes how to synchronize Ladybug cameras over USB3 by determining the relationship between the image timing and the camera’s current time. This is useful for Ladybug users who need to correlate their images with external information such as LIDAR or GPS.
USB 3.1 cycle time is driven by the USB Isochronous Timestamp Packet (ITP). The accuracy of the ITP is determined by the host PC. The tick’s average period is 125 µs.
The CYCLE_TIME register for Ladybug USB 3.1 cameras is located at 1EA8h. The timestamp format is as follows:
Because of the inaccuracy of the USB 3.1 IPT interval, the four least significant bits of the timestamp do not accurately reflect the cycle_offset and should be discounted.
Cycle_count—increments from 0 to 7999, which equals one second.
Second_count—increments from 0 to 127.
Synchronizing Ladybug and the Host
t = time read from CYCLE_TIMET = time read from host
1. Capture a Ladybug5 frame with embedded timestamp information. (t1)
2. Call ladybugGrabImage() to retrieve the frame.
3. Read CYCLE_TIME register immediately when ladybugGrabImage() returns. (t2)
4. Read system time immediately when ladybugGrabImage() returns. (T2)
5. Calculate the difference between t1 and t2 = Δt. This is the transmission time using CYCLE_TIME as reference.
6. Calculate the system time when shutter closes using host’s clock as reference. T2 – Δt = T1 Synchronization between the camera and the host is achieved when t1 can be matched with T1. Depending on the user’s application this synchronization process can be done repeatedly (for example, every 1 second) to keep the synchronization over extended period of time.
Testing Configuration and Results
|
|
||||||||||||||||||||||||
|