diff options
author | Théo de la Hogue | 2023-10-16 16:49:58 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-10-16 16:49:58 +0200 |
commit | f18c8dc95e1016f0783808fd5ab531fee62f4998 (patch) | |
tree | d06064b4095682e3c3ad3fff2a23f5166c4cdfa3 | |
parent | a2960562b3a66f610d8d7d8e80faedc2fff024b8 (diff) | |
download | argaze-f18c8dc95e1016f0783808fd5ab531fee62f4998.zip argaze-f18c8dc95e1016f0783808fd5ab531fee62f4998.tar.gz argaze-f18c8dc95e1016f0783808fd5ab531fee62f4998.tar.bz2 argaze-f18c8dc95e1016f0783808fd5ab531fee62f4998.tar.xz |
Failing to estimate pose when only one marker belongs to the scene.
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoScene.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py index b8b9cfd..51dd88c 100644 --- a/src/argaze/ArUcoMarkers/ArUcoScene.py +++ b/src/argaze/ArUcoMarkers/ArUcoScene.py @@ -117,6 +117,11 @@ class ArUcoScene(ArFeatures.ArScene): raise ArFeatures.PoseEstimationFailed('No marker belongs to the scene') + # Pose estimation fails if only one marker belongs to the scene + if len(scene_markers) == 1: + + raise ArFeatures.PoseEstimationFailed('Only one marker belongs to the scene') + # Estimate pose from a markers corners success, tvec, rmat = self.aruco_markers_group.estimate_pose_from_markers_corners(scene_markers, self.parent.aruco_detector.optic_parameters.K, self.parent.aruco_detector.optic_parameters.D) |