Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. clc;
  2. clear;
  3. close all;
  4.  
  5. imaqreset
  6.  
  7. colorVid = videoinput('kinect',1);
  8. depthVid = videoinput('kinect',2);
  9.  
  10. depthSource = getselectedsource(depthVid);
  11. depthSource.EnableBodyTracking = 'on';
  12.  
  13. colorVid.FramesPerTrigger = 1;
  14. depthVid.FramesPerTrigger = 1;
  15.  
  16. colorVid.TriggerRepeat = 30;
  17. depthVid.TriggerRepeat = 30;
  18.  
  19. triggerconfig([colorVid depthVid],'manual');
  20.  
  21. start([colorVid depthVid]);
  22.  
  23. pause(5);
  24.  
  25. % Trigger 200 times to get the frames.
  26.  
  27. for i = 1:30
  28. % Trigger both objects.
  29. trigger([colorVid depthVid])
  30. % Get the acquired frames and metadata.
  31. [imgColor, ts_color, metaData_Color] =getdata(colorVid);
  32. [imgDepth, ts_depth, metaData_Depth] =getdata(depthVid);
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement