How do I synchronize the color and depth sensors for Kinect for Windows using MATLAB? -
i capturing color , depth images kinect windows using matlab , official kinect sdk. both sensors synchronized such image each sensor of same moment. unfortunately, current implementation has lag between 2 sensors (of 1 second!). please me find way synchronize sensors. here current code:
colorvid = videoinput('kinect',1,'rgb_640x480'); depthvid = videoinput('kinect',2,'depth_640x480'); triggerconfig([colorvid depthvid],'manual'); set([colorvid depthvid], 'framespertrigger', 300); start([colorvid depthvid]); trigger([colorvid depthvid]); pause(10); [imgcolor, ts_color, metadata_color] = getdata(colorvid); [imgdepth, ts_depth, metadata_depth] = getdata(depthvid); stop([colorvid depthvid]); delete([colorvid depthvid]); clear colorvid depthvid;
i've played while , seems adding pause between start() , trigger() functions solves problem!
start([colorvid depthvid],'framespertrigger',300); pause(1); trigger([colorvid depthvid]);
Comments
Post a Comment