pypylon
pypylon copied to clipboard
Ensure synchronized grabbing from multiple cameras
Hi, I am building a stereo application where it is important to ensure that the processed frames were acquired synchronous at the same time, in order to triangulate points from the different views. I am syncing the image acquisition through PTP and periodic signal. The computing time for the stereo algorithm is very unstable and sometimes it takes longer than the fixed framerate. I struggle to decide on the most appropriate grabbing strategy.
I would like to use "LatestImageOnly" to be able to compare the output from my stereo application to other sensors, but for some reason it sometimes skips frames from one or more of the cameras. I dont know why this happens but could maybe be because the images are not transferred at the same time and the code therefore skip one of the frames if its not ready in the buffer? Is there a way to get around this problem?
I must keep track of when the images were acquired in order to compare my output to other sensors, therefore I dont want a queue building up. At the same time, I must ensure that the images were acquired at the same time and cannot allow one camera to skip an image and loose sync.
How would you approach this problem? Thank you very much in advance!