% This function demonstrates basic functionality of Optitrack SDK for
% communicating with Natural Point cameras. This has been specifically
% designed to work with the TrackIR4 camera (a small USB camera for
% tracking objects). The camera must be plugged in and device drivers
% installed. This should also work for the Optitrack cameras (FLEX).
% Written by Glen Lichtwark, University of Queensland, Australia
% Last updated: 22nd Jan 2010
% Please acknowledge in any academic papers which may utilise this code
%% PLEASE NOTE. OPTITRACK SDK HAS RECENTLY BEEN SUPERCEDED BY CAMERA SDK WHICH IS IMPLEMENTED IN A DIFFERENT WAY AND THEREFORE THIS DEMO IS OUT OF DATE!!! I WILL WORK ON A NEW DEMO OF THE CAMERA SDK FOR POSTING AT A LATER DATE.
Sorry for the earlier post.
I realized that I was running an older version of MATLAB (7.1). I have now installed the latest release (2009b) and your function appears to work.
Thanks again for these helpful tools!
Thank you for these good demos, Glen! I found you via the NaturalPoint help forum.
I have downloaded both this package and TT_Tools_demo, hoping to get a developmental "leg up".
I encountered a problem right off the bat with this file. I am using V100R2:FLEX cameras. Currently I have only one camera attached (and no hub). When I attempt to run this function, I receive the following output:
Number of cameras = 2
??? Error using ==> registerevent
Input must be a scalar handle.
Error in ==> optitrack_data at 31
The function reports 2 cameras because I have a Hardware Key (for the TT software license) installed; when I remove the key, the camera count drops to 1 but the error is the same. Any thoughts, or is this simply a problem with V100R2:FLEX cameras (as opposed to the TrackIR4 for which you developed this code)?
%% OPTITRACK SDK HAS RECENTLY BEEN SUPERCEDED BY CAMERA SDK WHICH IS IMPLEMENTED IN A DIFFERENT WAY AND THEREFORE THIS DEMO IS OUT OF DATE!!! I WILL WORK ON A NEW DEMO OF THE CAMERA SDK FOR POSTING AT A LATER DATE.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.