Closed RoksanaSadeghi closed 1 year ago
The two cameras do show different times (see seconds in the image below):
The slave camera is lagging behind.
Begin Acquisition of the slave first, and then the master helped with sync (up to 500Hz), but sometimes the slave is still one frame behind.
To fix the sync issue, considering Spinnaker has its own buffer for each camera (does it?), the buffer needs to be flushed before start grabbing images.
This added to the CameraEyeSpinnaker/BeginSynchronizedAcquisition lines 97 - 113 (see below). However, the spinnaker doesn't recognize the buffer. It needs to be set using the cam.SetUserBuffers(IntPtr pMemBuffers, ulong totalSize).
My understanding is that the buffer is set after clicking the start tracking button, but not sure how to get access to the buffer and set up the cam.SetUserBuffers inputs. The buffer is originally defined in EyeTrackerImageGrabber.cameraBuffer, which is a private BlockingCollection variable.