aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-10-16 19:32:15 +0200
committerThéo de la Hogue2023-10-16 19:32:15 +0200
commit0835382b4b12652e23dcebe2456431c3e625dc3a (patch)
treea4c5828e65b64d4341136b6e25293c401bff775b /src
parentf18c8dc95e1016f0783808fd5ab531fee62f4998 (diff)
downloadargaze-0835382b4b12652e23dcebe2456431c3e625dc3a.zip
argaze-0835382b4b12652e23dcebe2456431c3e625dc3a.tar.gz
argaze-0835382b4b12652e23dcebe2456431c3e625dc3a.tar.bz2
argaze-0835382b4b12652e23dcebe2456431c3e625dc3a.tar.xz
Fixing marker size guessing.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoMarkersGroup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoMarkersGroup.py b/src/argaze/ArUcoMarkers/ArUcoMarkersGroup.py
index bedd408..d30a730 100644
--- a/src/argaze/ArUcoMarkers/ArUcoMarkersGroup.py
+++ b/src/argaze/ArUcoMarkers/ArUcoMarkersGroup.py
@@ -247,16 +247,16 @@ class ArUcoMarkersGroup():
cw_corners = numpy.array([ vertices[i-1] for i in reversed(face) ])
# Edit place axis from corners positions
- place_x_axis = cw_corners[1:3].mean(axis=0)
+ place_x_axis = cw_corners[2] - cw_corners[3]
place_x_axis_norm = numpy.linalg.norm(place_x_axis)
- place_y_axis = cw_corners[2:4].mean(axis=0)
+ place_y_axis = cw_corners[0] - cw_corners[3]
place_y_axis_norm = numpy.linalg.norm(place_y_axis)
# Check axis size: they should be almost equal
if math.isclose(place_x_axis_norm, place_y_axis_norm, rel_tol=1e-3):
- current_marker_size = place_x_axis_norm*2
+ current_marker_size = place_x_axis_norm
# Check that all markers size are almost equal
if new_marker_size > 0: