aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-04-25 17:50:18 +0200
committerThéo de la Hogue2023-04-25 17:50:18 +0200
commit57b54b559ab312a764d0dca294140bc5073abd2d (patch)
treeead867535d2671a1b484e6b893885354ff1e8b31 /src
parent34b66cfa0ba454ad9d830e2b68dce4d4ce63882c (diff)
downloadargaze-57b54b559ab312a764d0dca294140bc5073abd2d.zip
argaze-57b54b559ab312a764d0dca294140bc5073abd2d.tar.gz
argaze-57b54b559ab312a764d0dca294140bc5073abd2d.tar.bz2
argaze-57b54b559ab312a764d0dca294140bc5073abd2d.tar.xz
Fixing scene translation estimation based on axis marker.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoScene.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py
index 70ce236..1bb76cd 100644
--- a/src/argaze/ArUcoMarkers/ArUcoScene.py
+++ b/src/argaze/ArUcoMarkers/ArUcoScene.py
@@ -527,6 +527,7 @@ class ArUcoScene():
P = numpy.array([OA*X_sign, OB*Y_sign, numpy.cross(OA*X_sign, OB*Y_sign)])
+ # Marker axis
OA = A_marker.translation - O_marker.translation
OA = OA / numpy.linalg.norm(OA)
@@ -543,7 +544,7 @@ class ArUcoScene():
self._rotation = P.dot(M.T)
# Consider ArUcoScene translation as the translation of the marker at axis origin
- self._translation = O_marker.translation - O_place.translation.dot(O_place.rotation).dot(O_marker.rotation.T)
+ self._translation = O_marker.translation - O_place.translation.dot(O_place.rotation).dot(M.T)
return self._translation, self._rotation