I'm having trouble to synchronize the color and depth image with Image acquisition ToolBox.
Currently, I'm just trying to log both streams into binary files without frame drop or losing the synchronization.
I don't try to render during my recording.
The code for the start button :
colorVid = videoinput('kinect',1); depthVid = videoinput('kinect',2);
colorVid.FramesPerTrigger = inf; depthVid.FramesPerTrigger = inf;
triggerconfig([colorVid depthVid],'manual');
iatconfigLogging(colorVid,'Video/Color.bin');
iatconfigLogging(depthVid,'Video/Depth.bin');
start([colorVid depthVid]);
pause(2); % this is to be sure both sensor are start before the trigger
trigger([colorVid depthVid]);
where the iatconfigureLogging() is from here
and the stop button just doing
stop([colorVid depthVid]);
Since the frames rate of the Kinect is 30FPS and we can't change this, I'm using FrameGrabInterval to emulate it.
But when I over like 5FPS, I can't log depth and color and keep the frames synchronized for more then 20-25 seconds. And except 1 FPS, the sync is over after 2-3 minutes and I'm looking for at least a 10-15 minutes acquisition.
I'm looking on something with like flushdata(obj,'triggers'); right now, but I don't figure it out how to keep the 30 FPS with the logging.
Thanks in advance for any one who will give something.