aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index ad70391..30b4415 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -115,16 +115,23 @@ class ArUcoCamera(ArFeatures.ArCamera):
# Load ArUcoScenes
new_scenes = {}
- for aruco_scene_name, aruco_scene_data in aruco_camera_data.pop('scenes').items():
- # Append name
- aruco_scene_data['name'] = aruco_scene_name
+ try:
+
+ for aruco_scene_name, aruco_scene_data in aruco_camera_data.pop('scenes').items():
+
+ # Append name
+ aruco_scene_data['name'] = aruco_scene_name
- # Create new aruco scene
- new_aruco_scene = ArUcoScene.ArUcoScene.from_dict(aruco_scene_data, working_directory)
+ # Create new aruco scene
+ new_aruco_scene = ArUcoScene.ArUcoScene.from_dict(aruco_scene_data, working_directory)
+
+ # Append new scene
+ new_scenes[aruco_scene_name] = new_aruco_scene
+
+ except KeyError:
- # Append new scene
- new_scenes[aruco_scene_name] = new_aruco_scene
+ pass
# Set image_parameters to default if there is not
if 'image_parameters' not in aruco_camera_data.keys():