Upload
alp-pehlivan
View
229
Download
0
Tags:
Embed Size (px)
Citation preview
Installing software
● You need Matlab R2013a or higher.● Write command “targetinstaller” to command window.● Select “from Internet” option to get support packages.
Click Next● From list find and select “Kinect for Windows Runtime”.
Note: You need Image Acquisition Toolbox for this.● Click Next. Log In to your MathWorks Account.● Continue and finish installing.Link For Support Package: http://www.mathworks.com/hardware-support/kinect-windows.html
Code for Getting the Datahttp://alpx.io/wp-content/uploads/2014/03/kinectExample.m.txtutilpath = fullfile(matlabroot, 'toolbox', 'imaq', 'imaqdemos', ...
'html', 'KinectForWindows');
addpath(utilpath);
vid1 = videoinput('kinect',1); % RGB camera
vid2 = videoinput('kinect',2); % Depth camera
srcColor = getselectedsource(vid1);
srcDepth = getselectedsource(vid2);
vid1.FramesPerTrigger = 1;
vid2.FramesPerTrigger = 1;
vid1.TriggerRepeat = fnum;
vid2.TriggerRepeat = fnum;
triggerconfig([vid1 vid2],'manual');
start([vid1 vid2]);
% Trigger both objects. trigger([vid1 vid2]) % Get the acquired frames and metadata. [imgColorAll, ts_colorAll, metaData_ColorAll] = getdata(vid1); [imgDepthAll, ts_depthAll, metaData_DepthAll ] = getdata(vid2);