Difference between revisions of "Optotrak Motion Tracking System"
Line 93: | Line 93: | ||
*do stuff | *do stuff | ||
*deactivate | *deactivate | ||
==Opto Analysis== |
Revision as of 22:01, 29 November 2012
Using NDI Software
utilities > query system camera c3 - 3 sensors
to get feel for range of trackable space, green light = marker seen, vs. red light
new experiment : next > next >
ports (front of box) + how many markers
1 + 6 markers
cal frequency = 200hz for raipd reaching namicmaker power frequency- leave alone
finish
play around with markers to test where your capture volume is
Optotrack Matlab Code
optotrack matlab code, functions for interfacing with c api (not on cd, given by some guy) more in optomfiles, not more frequently used
runshapempt.m
optotrak_init, written by craig, set up (each subject)
create local coofdinate frame: dynamic and static
looking at only one marker (frontmost);
next ask for 3 points: 0,0 then x-axis (not amount, just positive x) then y (positive)
datagetnext3d- gets next available position of marker (must initialize pdtadest as single)- note: opto deals in single precision, matlab likes to work in double
note: opto calls any missing value as high negative number, can call "nan" in matlab
setup opto activates markers, so then deactivate
T_glob_loc from global opto coordinate frame to local table coordinate frame
make folder for handling raw opto data (idiosyncratic to craig's subject folder structure)
realtime in actual experiment:
line 50 - 88
line 375 0 make sure in right folder -
activate
start position code - 379-399 get location, change to double from single, tranform it, then use it (1:3) = only one marker xyz, (4:6) -
data buffer start buffers on separate opto box
if want to use real time marker in matlab- can use velocity to see if moved -
detectvelonset.m function, stores 4 samples at a time and calculates whether velocity exceeds threshold
end of trial: make sure finished writing buffer- spooling finished? then deactivate markers
analyze reach- for analysis, filter, fill in missing data
SUMMARY
beginning of experiment:
- initialize
- setup frame
- setup opto
trial loop:
- activate
- do stuff
- deactivate