aboutsummaryrefslogtreecommitdiff
path: root/src/examples/export_aruco_markers.py
blob: 2d559319072fca03a8e6b5ca0153edc58f6b0b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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