Fetch the cameras's timestamp associated with an image - #38
Conversation
Add an option to fetch the timestamp of when the frame acquision was triggered along with the image. This is useful for applications that require very accurate timestamps when the camera supports PTP IEEE-1588 synchronization. This timestamp is grabbed using the Basler pylon API's chunk feature.
| # Set this flag to true only if the camera's clock is synchronized | ||
| # with the clock of the host computer (through PTP IEEE-1588). | ||
| # By default, the flag is set to false. | ||
| # fetch_camera_timestamp: true |
There was a problem hiding this comment.
Could you, please, add a description to README.md?
| * The unit of each tick is 8ns. So, we need to multiply the variable by 8. | ||
| * Note that multiplied value will wrap around from 0 if chunckTimestamp >= 2^61, | ||
| * or roughly 26687 days after the camera setup. */ | ||
| chunckTimestampCopy <<= 3; |
There was a problem hiding this comment.
@briansmlee Thanks for this implementation. I have tested it and confirmed this works. I wanted to point out an issue with hardcoding the mapping from ticks to time elapsed. I understand most cameras with PTP enabled have a mapping of 1 tick = 1ns (1 tick = 8ns valid only when when PTP is disabled) for instance:
You can confirm if there are any cameras that have a 1 tick = 8ns mapping when PTP is enabled by displaying all camera models at: https://docs.baslerweb.com/timestamp.
In any case, it might be a good idea to have this as a parameter in the config file like you have done for enabling timestamp fetching.
Thanks,
Neel

Add an option to fetch the timestamp of when the frame acquision was triggered along with the image. This is useful for applications that require very accurate timestamps when the camera supports PTP IEEE-1588 synchronization.
This timestamp is grabbed using the Basler pylon API's chunk feature.