aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-07 22:31:28 +0200
committerThéo de la Hogue2022-09-07 22:31:28 +0200
commit17878bf1ce1e6db238af8f2e170a8eeaa6870e55 (patch)
tree395d37498cdd77ca0debafb582547949acfea729 /src
parentd0c462824c7e3251df4f8aedc3493b7d48bbd3c7 (diff)
downloadargaze-17878bf1ce1e6db238af8f2e170a8eeaa6870e55.zip
argaze-17878bf1ce1e6db238af8f2e170a8eeaa6870e55.tar.gz
argaze-17878bf1ce1e6db238af8f2e170a8eeaa6870e55.tar.bz2
argaze-17878bf1ce1e6db238af8f2e170a8eeaa6870e55.tar.xz
Adding get_marker_index method and fixing get_marker_corners.
Diffstat (limited to 'src')
-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."""