Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement