aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoTracker.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoTracker.py b/src/argaze/ArUcoMarkers/ArUcoTracker.py
index a9cb4d5..b887812 100644
--- a/src/argaze/ArUcoMarkers/ArUcoTracker.py
+++ b/src/argaze/ArUcoMarkers/ArUcoTracker.py
@@ -287,9 +287,15 @@ class ArUcoTracker():
else:
return []
+ def get_marker_index(self, marker_id):
+ """Retreive marker index of a given merker id.
+ Raise ValueError if not found."""
+
+ return list(self.__markers_ids).index(marker_id)
+
def get_marker_corners(self, i):
"""Get marker i corners."""
- return self.__markers_corners[i]
+ return self.__markers_corners[i][0]
def get_marker_center(self, i):
"""Get marker i center coordinates."""