~ubuntu-branches/ubuntu/trusty/psychtoolbox-3/trusty-proposed

« back to all changes in this revision

Viewing changes to Psychtoolbox/PsychDocumentation/InstallKinect.m

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-11-19 23:34:50 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20131119233450-f7nf92vb8qavjmk8
Tags: 3.0.11.20131017.dfsg1-3
Upload to unsable since fresh glew has arrived to sid!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
% InstallKinect - Kinect driver installation instructions.
2
2
%
3
3
% MS-Windows:
 
4
% -----------
4
5
%
5
6
% 1. Unzip the file Psychtoolbox/PsychContributed/Kinect-v16-WindowsDrivers.zip
6
7
%    into a temporary folder, e.g., C:\tmp\KinectDrivers.
36
37
%
37
38
%
38
39
% GNU/Linux:
 
40
% ----------
39
41
%
40
42
% If you use the Psychtoolbox distribution provided by the NeuroDebian
41
43
% project (http://neuro.debian.net) there's nothing to do. It should "just
76
78
% 3. After this procedure, the Kinect should be fully useable by Psychtoolbox.
77
79
%
78
80
%
79
 
% CAVEAT:
 
81
% Mac OS/X:
 
82
% ---------
 
83
%
 
84
% See the OS/X section at http://openkinect.org/wiki/Getting_Started
 
85
% You will need libfreenect version 0.1.2 or compatible for this to work.
 
86
%
 
87
% The easiest way to get these libraries on OSX is via Homebrew.
 
88
% Get it at: http://mxcl.github.com/homebrew
 
89
%
 
90
% Once Homebrew is installed, one first needs to "brew install automake",
 
91
% and "brew install autoconfig", and potentially cmake before one can
 
92
% "brew install libfreenect".
 
93
%     
 
94
% PsychKinectCore links dynamically against those two libraries. We don't
 
95
% distribute them for now, as that would require us to distribute the
 
96
% corresponding source code of libusb-1.0.0 as well due to LGPLv2
 
97
% requirements.
 
98
%     
 
99
%
 
100
% CAVEATS:
 
101
% --------
80
102
%
81
103
% This is still early prototype software, expect bugs, bumps and hickups.
82
104
%
 
105
% The Kinect driver has been successfully tested with "Microsoft XBox
 
106
% Kinect". This version doesn't yet work with "Microsoft Kinect for
 
107
% Windows", due to lack of support in the libfreenect-0.1.2 library.
 
108
%
83
109
% Further installation instructions for other systems can be found at
84
110
% http://openkinect.org/wiki/Getting_Started
85
111
%
86
 
% Mac OS/X:
87
 
% See the OS/X section at http://openkinect.org/wiki/Getting_Started
88
 
% You will need libfreenect version 0.1.2 or compatible for this to work.
89
112
%
90
113
% Licenses: The driver consists of multiple components, which are licensed
91
114
% under different free software / open source licenses. The drivers are
98
121
% GPLv2 or Apache license.
99
122
%
100
123
% The source code of the Windows version of the Kinect driver and libusb
101
 
% can be found after checking out Psychtoolbox's C source code from the SVN
102
 
% repository (see "help UseTheSource" for instructions) as a zip file under:
 
124
% can be found after checking out Psychtoolbox's C source code from our GIT
 
125
% repository (see "help UseTheSource" for instructions) as a zip file
 
126
% under:
103
127
%
104
 
% trunk/PsychSourceGL/Cohorts/Kinect-v16-withsource.zip
 
128
% Psychtoolbox-3/PsychSourceGL/Cohorts/Kinect-v16-withsource.zip
105
129
%
106
130
% The source code for libfreenect (Unix aka Linux / MacOS/X) can be found
107
131
% under:
120
144
drawnow;
121
145
[rc, msg] = system(cmd);
122
146
if rc == 0
123
 
  fprintf('Success! Now disabling the Kinect video driver. If this does not complete within a second,\n');
124
 
  fprintf('you may need to blindly type your password again + ENTER, but usually it just completes.\n');
125
 
  drawnow;
126
 
  [rc, msg] = system('sudo rmmod gspca_kinect');
127
 
  if rc == 0
128
 
    fprintf('Success! Your Kinect should now be useable by Psychtoolbox PsychKinect driver.\n');
129
 
  else
130
 
    fprintf('Failed! Maybe retry? Other than that, unplug your Kinect and reboot your machine to make it work.\n');
 
147
    fprintf('Success! Now disabling the Kinect video driver. If this does not complete within a second,\n');
 
148
    fprintf('you may need to blindly type your password again + ENTER, but usually it just completes.\n');
 
149
    drawnow;
 
150
    [rc, msg] = system('sudo rmmod gspca_kinect');
 
151
    if rc == 0
 
152
        fprintf('Success! Your Kinect should now be useable by Psychtoolbox PsychKinect driver.\n');
 
153
    else
 
154
        fprintf('Failed! Maybe retry? Other than that, unplug your Kinect and reboot your machine to make it work.\n');
 
155
        fprintf('Reported error was: %s\n', msg);
 
156
    end
 
157
else
 
158
    fprintf('Failed! Maybe retry? Or ask a system administrator for help.\n');
131
159
    fprintf('Reported error was: %s\n', msg);
132
 
  end
133
 
else
134
 
  fprintf('Failed! Maybe retry? Or ask a system administrator for help.\n');
135
 
  fprintf('Reported error was: %s\n', msg);
136
160
end
137
161
 
138
162
fprintf('If you want to enable use of Kinect as a regular webcam again, type the\n');