Imaging Products timestamping and different timestamp mechanisms

Last Revision Date: 4/14/2016

This article describes the different timestamps available to the user to determine when an image was captured.

With Spinnaker SDK, the timestamp is part of the information contained in chunk data for the image.

Use ChunkModeActive to to enable chunk data for images. Use ChunkSelector to select ImageTimestamp,  and ChunkEnable to enable or disable it. For more information, see the Programmer's Guide and API Reference, included with the SDK.

With FlyCapture SDK, users have access to the following different timestamps:

    • PC system clock - This timestamp is generated from the PC's clock. Captured images are timestamped once the last image packet arrives at the PC. This gives a rough time estimate and is generally not recommended for precision purposes. Note: PC system clock is only available on Windows and does not work on Linux.

In the FlyCapture 1.x interface, this timestamp can be accessed through the FlyCaptureTimeStamp.ulSeconds and FlyCaptureTimeStamp.ulMicroSeconds members of the FlyCaptureImage structure. Using FlyCapture2, reference the seconds and microseconds attributes of the TimeStamp structure, where seconds is UNIX time in seconds. For more information on these structures, consult the FlyCapture2 SDK Help.

The PC system timestamp is based on the KeQuerySystemTime, and the current PC system time can be queried by using the KeQuerySystemTime routine. See the Microsoft article for KeQuerySystemTime for further instructions.

    • 1394 cycle time - This timestamp is based on the 1394 cycle timer (which increments at 8kHz). Captured images are timestamped at the time that the shutter was closed.

In the FlyCapture 1.x interface, this timestamp can be accessed through the FlyCaptureTimeStamp.ulCycleSecondsand FlyCaptureTimeStamp.ulCycleCount members of the FlyCaptureImage structure. Using FlyCapture2, reference the cycleSeconds and cycleCount attributes of the TimeStamp structure. For more information on these structures, consult the FlyCapture SDK Help.

The 1394 cycle timer is not available on USB3 and GigE Vision cameras. For these models, use the camera’s internal clock.

    • Embedded image timestamp - This timestamp takes the 1394 cycle timer at the time that the shutter was closed and embeds the information in the image pixels. This is the most accurate of the timestamps.

To access this, set the appropriate bit of the FRAME_INFO register 12F8h or use flycaptureSetImageTimestamping() (FlyCapture v1.x), and then use a function to read the first 4 bytes of the image (the timestamp is located in the first 4 pixels of the image). For an example of how this is done in the FlyCapture interface, refer to the MultipleCameraEx sample program. For a FlyCapture 1.x example of how to manually parse the image data to retrieve this timestamp, download this sample program. Using FlyCapture2 you can enable the Embedded image timestamp using SetEmbeddedImageInfo (), and use GetMetaData() function to read the Embedded timestamp of the image.

The camera firmware is designed to grab at selected intervals of the 1394 cycle time. To compare any of these timestamps with the absolute cycle time information on the 1394 bus, query CYCLE_TIME register FF100200h.

Artículos relacionados