Be the first to rate this file! 16 Downloads (last 30 days) File Size: 2.15 KB File ID: #26450
image thumbnail

Optitrack SDK interface demo

by

 

22 Jan 2010 (Updated )

Demonstration file on how to interface directly with Natural Points USB cameras (TrackIR or FLEX)

| Watch this File

File Information
Description

% optitrack_data()
%
% 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.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
17 Feb 2010 Greg Fricke

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!

17 Feb 2010 Greg Fricke

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:

Device Arrived
Device Arrived
Number of cameras = 2
??? Error using ==> registerevent
Input must be a scalar handle.

Error in ==> optitrack_data at 31
registerevent(h2,@frame_events);

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)?

Thanks!

Updates
24 Feb 2011

%% 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.

Contact us