Eye tracker:
frame rate: 25 times a sec (Hz)

#first convert your .ogg video to .mpg

open the terminal, and then go to the directory where the script is: cd /groups/Projects/P1235/PhaseC/EyeTracker/pupil/


ffmpeg -i /groups/Projects/P1235/PhaseC/EyeTracker/P1235C11R3707_2014Jun11_125915.ogg -b 5000k /scratch/groups/Projects/P1235/PhaseC/EyeTracker/PupilAnalyses/P1235C11R3707_2014Jun11_125915.mpg


#then run (from the directory where the code is: cd /groups/Projects/P1235/PhaseC/EyeTracker/pupil/):

python pupilData.py (or python pupilDataSM???.py)
(and pick the file from the file dialog)

or 

python pupilData.py /groups/Projects/P1174/YNiCEyeCapture/results/R3625/R3625_2014Jun24_161011.mpg


1.Double click on the left button in the window VideoFrames to jump a few frames forward. (sometimes the position of the eye changes at the beggining)
2.Click left mouse to grab a part of the image (4 times, left/right corners). Then press the right mouse button>Yes
Press 1 to run the video; 0 to stop; space moves 1 frame at a time (window pupil_centre)
Check the window: IMG
Now you are ready to start changing the settings until you have a good image of the pupil:
a)Press left or right arrow in the keyboard to change the threshold level, until you have a clear selection of the pupil (until you start seeing other parts of the eye);
You may need to change other settings to get a good image of the pupil: 
b)"," (pupil_max_area -) and "." (pupil_max_area +);
c) upper arrow (pupil_min_area +) and lower arrow (pupil_min_area -)

When happy Press "q"

Close the graphs and the data will be saved: Data results file is being saves in '/scratch/groups/Projects/P1235/PhaseC/EyeTracker/PupilAnalyses/Results'


Tips to work with the terminal:
"Ctrl"+"C": quits the program




