diff options
author | Théo de la Hogue | 2023-09-05 08:59:19 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-09-05 08:59:19 +0200 |
commit | a57fcf2b9357dd0c474642da29175af2ff1c7147 (patch) | |
tree | e53473df741e218bd8b57fd6a7ec9ec924c7b8ae | |
parent | f8913ce2fa1aecde19830de69682199dfd78c43d (diff) | |
download | argaze-a57fcf2b9357dd0c474642da29175af2ff1c7147.zip argaze-a57fcf2b9357dd0c474642da29175af2ff1c7147.tar.gz argaze-a57fcf2b9357dd0c474642da29175af2ff1c7147.tar.bz2 argaze-a57fcf2b9357dd0c474642da29175af2ff1c7147.tar.xz |
Using ArFeatures exceptions.
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoCamera.py | 2 | ||||
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoScene.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py index f7fcb25..5ff4b85 100644 --- a/src/argaze/ArUcoMarkers/ArUcoCamera.py +++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py @@ -195,7 +195,7 @@ class ArUcoCamera(ArFeatures.ArCamera): # Build AOI scene directly from detected ArUco marker corners self.layers[??].aoi_2d_scene |= scene.build_aruco_aoi_scene(self.aruco_detector.detected_markers) - except SceneProjectionFailed: + except ArFeatures.PoseEstimationFailed: pass ''' diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py index 227d3c6..e128e0f 100644 --- a/src/argaze/ArUcoMarkers/ArUcoScene.py +++ b/src/argaze/ArUcoMarkers/ArUcoScene.py @@ -99,14 +99,14 @@ class ArUcoScene(ArFeatures.ArScene): # Pose estimation fails when no marker is detected if len(detected_markers) == 0: - raise PoseEstimationFailed('No marker detected') + raise ArFeatures.PoseEstimationFailed('No marker detected') scene_markers, _ = self.aruco_markers_group.filter_markers(detected_markers) # Pose estimation fails when no marker belongs to the scene if len(scene_markers) == 0: - raise PoseEstimationFailed('No marker belongs to the scene') + raise ArFeatures.PoseEstimationFailed('No marker belongs to the scene') # Estimate scene pose from unique marker transformations elif len(scene_markers) == 1: @@ -122,7 +122,7 @@ class ArUcoScene(ArFeatures.ArScene): # Pose estimation fails when no marker passes consistency checking if len(consistent_markers) == 0: - raise PoseEstimationFailed('Unconsistent marker poses', unconsistencies) + raise ArFeatures.PoseEstimationFailed('Unconsistent marker poses', unconsistencies) # Otherwise, estimate scene pose from all consistent markers pose tvec, rmat = self.aruco_markers_group.estimate_pose_from_markers(consistent_markers) |