我使用软件手动触发同时并同步地获取了颜色和深度数据:
clc;
clear;
close all;
imaqreset
colorVid = videoinput('kinect',1);
depthVid = videoinput('kinect',2);
depthSource = getselectedsource(depthVid);
depthSource.EnableBodyTracking = 'on';
colorVid.FramesPerTrigger = 1;
depthVid.FramesPerTrigger = 1;
colorVid.TriggerRepeat = 30;
depthVid.TriggerRepeat = 30;
triggerconfig([colorVid depthVid],'manual');
start([colorVid depthVid]);
pause(5);
% Trigger 200 times to get the frames.
for i = 1:30
% Trigger both objects.
trigger([colorVid depthVid])
% Get the acquired frames and metadata.
[imgColor, ts_color, metaData_Color] =getdata(colorVid);
[imgDepth, ts_depth, metaData_Depth] =getdata(depthVid);
end
现在我要保存这些颜色和深度框,以便以后使用,该如何做?
有人可以帮助我吗?
谢谢。