diff options
Diffstat (limited to 'src/argaze/utils/analyse_tobii_segment_fixations.py')
-rw-r--r-- | src/argaze/utils/analyse_tobii_segment_fixations.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/argaze/utils/analyse_tobii_segment_fixations.py b/src/argaze/utils/analyse_tobii_segment_fixations.py index 32fa32d..26f0838 100644 --- a/src/argaze/utils/analyse_tobii_segment_fixations.py +++ b/src/argaze/utils/analyse_tobii_segment_fixations.py @@ -24,11 +24,15 @@ def main(): tobii_segment = TobiiEntities.TobiiSegment(args.segment_path) # Load a tobii segment video - tobii_segment_video = tobii_segment.get_video() - print(f'Video width: {tobii_segment_video.get_width()}, height: {tobii_segment_video.get_height()}, fps: {tobii_segment_video.get_fps()}') - - # Load a tobii segment timestamped gaze position data buffer - tobii_ts_gaze_position_buffer = tobii_segment.get_data().load()['gidx-l-gp'] + tobii_segment_video = tobii_segment.load_video() + print(f'Video duration: {tobii_segment_video.get_duration()}, frame number: {tobii_segment_video.get_frame_number()}, width: {tobii_segment_video.get_width()}, height: {tobii_segment_video.get_height()}') + + # Load a tobii segment data + tobii_segment_data = tobii_segment.load_data() + print(f'Data keys: {tobii_segment_data.keys()}') + + # Access to timestamped gaze position data buffer + tobii_ts_gaze_position_buffer = tobii_segment_data['gidx-l-gp'] print(f'{len(tobii_ts_gaze_position_buffer)} gaze positions loaded') @@ -49,6 +53,11 @@ def main(): for ts, f in fixation_analyser.fixations.items(): print(f'start time = {ts}, duration = {f.duration}, dispertion = {f.dispersion}, centroid = {f.centroid}') + # TODO : synchronise video and gaze + #for ts, frame in tobii_segment_video: + + #print(ts) + if __name__ == '__main__': main()
\ No newline at end of file |