How to synchronize to the Timestamp included in the image descriptor for a given camera?
To know when an image was captured with respect to an external clock, can be done as follows:
You can use the API feature called "PxLGetCurrentTimestamp". This will provide you with the current timestamp of that camera.
You can then compare that value against the current system/controller clock to provide a reference.
When you receive an image with a given timestamp you can then calculate what time that is with respect to the computer time.
There is drift in the camera timestamp, therefore we recommend resynchronizing the camera timestamp to the system clock at regular intervals if possible (once a minute for example).
The timestamp drift over 60 seconds would be less than 2.5ms.
PXL_RETURN_CODE PxLGetCurrentTimestamp ( IN HANDLE hCamera, OUT double* pCurrentTimestamp);
Returns the current value of the camera’s ‘clock’ that it uses to timestamp images (as returned in the dFrameTime field of the FRAME_DESC returned with each captured image)..
Comments, Restrictions and Limitations
This function will only return successfully with a valid timestamp, if the camera supports hardware time stamping (currently, all PL-C & PL-D camera models do).