aboutsummaryrefslogtreecommitdiff
path: root/src/examples/export_aruco_markers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/export_aruco_markers.py')
-rw-r--r--src/examples/export_aruco_markers.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/examples/export_aruco_markers.py b/src/examples/export_aruco_markers.py
new file mode 100644
index 0000000..2d55931
--- /dev/null
+++ b/src/examples/export_aruco_markers.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+"""
+export_markers.py
+
+Author:
+ - Théo de la Hogue, theo.de-la-hogue@enac.fr
+
+"""
+import os
+from argaze.ArUcoMarkers import ArUcoMarkers
+
+# manage export folder
+current_folder = os.path.dirname(__file__)
+export_folder = os.path.join(current_folder, '_export/markers')
+if not os.path.exists(export_folder):
+ os.makedirs(export_folder)
+ print(f'\'_export/markers\' folder created')
+
+# create aruco markers
+aruco_markers = ArUcoMarkers.ArUcoMarkers('DICT_4X4_50')
+
+# export markers
+aruco_markers.export_all(export_folder, 300) # destination folder, dpi