aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-21 19:07:32 +0200
committerThéo de la Hogue2022-09-21 19:07:32 +0200
commit8d949ed0c38f1cb3d032b2c9b299f0e0dd40cf0e (patch)
treeaeb2710efcd98521081de0be3ba90103a0c09a61 /src
parentab33be7af59513b1d19a52472303ad52e720e978 (diff)
downloadargaze-8d949ed0c38f1cb3d032b2c9b299f0e0dd40cf0e.zip
argaze-8d949ed0c38f1cb3d032b2c9b299f0e0dd40cf0e.tar.gz
argaze-8d949ed0c38f1cb3d032b2c9b299f0e0dd40cf0e.tar.bz2
argaze-8d949ed0c38f1cb3d032b2c9b299f0e0dd40cf0e.tar.xz
Setting default dispersion to 50 px.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_segment_gaze_movements_export.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/argaze/utils/tobii_segment_gaze_movements_export.py b/src/argaze/utils/tobii_segment_gaze_movements_export.py
index b8806fe..cf11431 100644
--- a/src/argaze/utils/tobii_segment_gaze_movements_export.py
+++ b/src/argaze/utils/tobii_segment_gaze_movements_export.py
@@ -19,7 +19,7 @@ def main():
parser = argparse.ArgumentParser(description=main.__doc__.split('-')[0])
parser.add_argument('-s', '--segment_path', metavar='SEGMENT_PATH', type=str, default=None, help='path to a tobii segment folder')
parser.add_argument('-r', '--time_range', metavar=('START_TIME', 'END_TIME'), nargs=2, type=float, default=(0., None), help='start and end time (in second)')
- parser.add_argument('-d', '--dispersion_threshold', metavar='DISPERSION_THRESHOLD', type=int, default=10, help='dispersion threshold in pixel')
+ parser.add_argument('-d', '--dispersion_threshold', metavar='DISPERSION_THRESHOLD', type=int, default=50, help='dispersion threshold in pixel')
parser.add_argument('-t', '--duration_threshold', metavar='DURATION_THRESHOLD', type=int, default=100, help='duration threshold in millisecond')
parser.add_argument('-o', '--output', metavar='OUT', type=str, default=None, help='destination folder path (segment folder by default)')
parser.add_argument('-w', '--window', metavar='DISPLAY', type=bool, default=True, help='enable window display', action=argparse.BooleanOptionalAction)
@@ -116,8 +116,6 @@ def main():
# Store unvalid gaze position for further movement processing
ts_gaze_positions[ts/1000] = GazeFeatures.UnvalidGazePosition()
- print(f'Invalid gaze position stored at {ts/1000} ms')
-
print(f'Movement identifier parameters:')
print(f'\tDispersion threshold = {args.dispersion_threshold}')
print(f'\tDuration threshold = {args.duration_threshold}')
@@ -199,7 +197,7 @@ def main():
if video_ts_ms > current_fixation_ts + current_fixation.duration:
current_fixation_ts, current_fixation = fixations.pop_first()
- current_fixation_time_counter = 0
+ current_fixation_time_counter = 1
# Draw saccade
if len(saccades) > 0:
@@ -216,7 +214,7 @@ def main():
current_fixation_time_counter += 1
- cv.circle(video_frame.matrix, current_fixation.centroid, current_fixation.dispersion + current_fixation_time_counter, (0, 255, 0), 1)
+ cv.circle(video_frame.matrix, current_fixation.centroid, current_fixation.dispersion, (0, 255, 0), current_fixation_time_counter)
try: