Difference between revisions of "Optitrak + Projector touch table/surface"

From REALab Wiki
Jump to navigation Jump to search
Line 15: Line 15:


  function [touch_plane_info, client] = opti_setup_touch_plane_srt
  function [touch_plane_info, client] = opti_setup_touch_plane_srt
if ~IsAssemblyAdded('NatNetML') 
Opti = NET.addAssembly('C:\Users\Jim Enns\Documents\MATLAB\NatNetSDK2.2\NatNetSDK\lib\NatNetML.dll');
end

Revision as of 18:37, 19 April 2012


Matlab scripts

Setting the optitrak plane in matlab

In place of the matlab code for reading in optitrak data, the following matlab function can be used to:

  1. read in data sent from the optitrak system, and furthermore
  2. set the table top plane, as understood by the Optitrak, into variables for reference in matlab, and
  3. transform the native coordinate system of the optitrak (x z y) into another, possibly more familiar coordinate system (x y z).

This function should be called before opening a main window with psychtoolbox.


function [touch_plane_info, client] = opti_setup_touch_plane_srt
if ~IsAssemblyAdded('NatNetML')  

Opti = NET.addAssembly('C:\Users\Jim Enns\Documents\MATLAB\NatNetSDK2.2\NatNetSDK\lib\NatNetML.dll');

end