aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: