aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-11-21 19:34:29 +0100
committerThéo de la Hogue2022-11-21 19:34:29 +0100
commit59ed28117275827303854cabe50339c34499f5aa (patch)
tree7ae660acd7704e228eb3b0e9de21c44ba66b4ea7 /src
parent7e6c9bbbceaa8db48b73898d93a3d184ac8b67fa (diff)
downloadargaze-59ed28117275827303854cabe50339c34499f5aa.zip
argaze-59ed28117275827303854cabe50339c34499f5aa.tar.gz
argaze-59ed28117275827303854cabe50339c34499f5aa.tar.bz2
argaze-59ed28117275827303854cabe50339c34499f5aa.tar.xz
Fixing type casting.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_segment_aruco_aoi_export.py2
-rw-r--r--src/argaze/utils/tobii_stream_aruco_aoi_display.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/argaze/utils/tobii_segment_aruco_aoi_export.py b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
index 0e9e302..9f6ae78 100644
--- a/src/argaze/utils/tobii_segment_aruco_aoi_export.py
+++ b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
@@ -259,7 +259,7 @@ def main():
# Merge all 2D aoi into a single 2D scene
aoi2D_merged_scene = AOI2DScene.AOI2DScene()
for name, aoi_array in aoi2D_dict.items():
- aoi2D_merged_scene[name] = numpy.sum(aoi_array, axis=0) / len(aoi_array)
+ aoi2D_merged_scene[name] = AOIFeatures.AreaOfInterest(numpy.sum(aoi_array, axis=0) / len(aoi_array))
aoi2D_merged_scene.draw(visu_frame.matrix, (0, 0))
diff --git a/src/argaze/utils/tobii_stream_aruco_aoi_display.py b/src/argaze/utils/tobii_stream_aruco_aoi_display.py
index 15f1fde..c5becff 100644
--- a/src/argaze/utils/tobii_stream_aruco_aoi_display.py
+++ b/src/argaze/utils/tobii_stream_aruco_aoi_display.py
@@ -182,7 +182,7 @@ def main():
# When head is moving, ArUco tracking could return bad pose estimation and so bad AOI scene projection
if head_moving:
- ts_aois_scenes[round(video_ts_ms)] = AOIScene2D.AOI2DScene()
+ ts_aois_scenes[round(video_ts_ms)] = AOI2DScene.AOI2DScene()
raise UserWarning('Head is moving')
@@ -197,7 +197,7 @@ def main():
# When no marker is detected, no AOI scene projection can't be done
if aruco_tracker.tracked_markers_number == 0:
- ts_aois_scenes[round(video_ts_ms)] = AOIScene2D.AOI2DScene()
+ ts_aois_scenes[round(video_ts_ms)] = AOI2DScene.AOI2DScene()
raise UserWarning('No marker detected')
@@ -240,7 +240,7 @@ def main():
# Merge all 2D aoi into a single 2D scene
aoi2D_merged_scene = AOI2DScene.AOI2DScene()
for name, aoi_array in aoi2D_dict.items():
- aoi2D_merged_scene[name] = numpy.sum(aoi_array, axis=0) / len(aoi_array)
+ aoi2D_merged_scene[name] = AOIFeatures.AreaOfInterest(numpy.sum(aoi_array, axis=0) / len(aoi_array))
aoi2D_merged_scene.draw(visu_frame.matrix)