-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37dd3a
commit 9f83639
Showing
10 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Parameters Setting | ||
sampling_rate = 1000 # 1/T = 1000Hz | ||
|
||
# Setup | ||
distance = 450 # mm | ||
height = 113 # mm | ||
res_height = 1400 | ||
|
||
# Fixation and Saccade Threshold | ||
sac_min_thres = 130 # degree | ||
sac_max_thres = 750 # degree | ||
fix_max_thres = 50 # degree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Algorithm: | ||
1. Get subject’s raw (x, y) eye gaze pixel data for each sessions from the csv file. | ||
2. Convert (x, y) pixel data to visual angle, θ. | ||
3. Calculate velocity at each instantaneous visual angle using velocity FIR filter. | ||
Velocity FIR filter, h: | ||
h = {1, -1} for a 2-tap FIR filter | ||
h = {-3, -2, -1, 0, 1, 2, 3} for a 7-tap FIR filter | ||
4. Label each velocity point below velocity threshold as a fixation point, otherwise as a saccade point. | ||
5. Collapse consecutive fixation points into fixation groups and saccade points into saccade groups. | ||
6. Return fixations and Saccades | ||
|
||
|
||
Pseudocode: | ||
Fixation_Detection(θ[N], h[k], sac_min, sac_max, fix_max): | ||
//initialization of Velocity | ||
for i = 0 to N−k−1: | ||
velocity[i] = 0 | ||
|
||
//calculating velocity using velocity FIR Filter | ||
for i = 0 to N−k−1: | ||
for j = 0 to k: | ||
velocity[i] = velocity[i] + (θ[i+j]*h[j]) | ||
|
||
//detection of fixation groups and saccade groups | ||
for i = 0 to N−k−1: | ||
if (velocity[i] >= sac_min and velocity[i] <= sac_max): | ||
if (fixation_group is not empty): | ||
add fixation_group to fixations and clear fixation_group | ||
add gaze point (x[i], y[i]) of θ[i] to saccade_group | ||
|
||
else if (velocity[i] <= fix_max): | ||
if (saccade_group is not empty): | ||
add saccade_group to saccades and clear saccade_group | ||
add gaze point (x[i], y[i]) of θ[i] to fixation_group | ||
|
||
if (fixation_group is not empty): | ||
add fixation_group to fixations and clear fixation_group | ||
if (saccade_group is not empty): | ||
add saccade_group to saccades and clear saccade_group | ||
|
||
return fixations, saccades |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Average Fixation Durations 244.57142857142858 | ||
Number of Fixations: 7 | ||
Fixation Durations: [102.0, 201.0, 177.0, 400.0, 419.0, 276.0, 137.0] | ||
Centroids x-axis: [143.9638235294117, -364.02029850746294, -592.8133333333335, 32.943499999999965, -620.1854653937955, -51.22351449275363, -588.0485401459857] | ||
Centroids y-axis: [29.64245098039216, -367.9975621890551, -566.1863841807907, -341.16490000000005, -613.8899522673046, -358.10891304347797, -591.3255474452549] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Average Fixation Durations 246.28571428571428 | ||
Number of Fixations: 7 | ||
Fixation Durations: [90.0, 203.0, 179.0, 402.0, 423.0, 275.0, 152.0] | ||
Centroids x-axis: [152.16522222222224, -358.5721182266011, -597.11217877095, 36.526815920398, -621.7815366430269, -46.38592727272728, -589.3042105263156] | ||
Centroids y-axis: [34.93200000000001, -362.24995073891665, -566.4578770949719, -339.10597014925395, -615.3042316784883, -354.7477818181816, -591.0775657894733] |