blob: afc5749f0ee20ffaebaf63d75a6d87e309dd8d88 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Ready-made scripts
==================
Collection of command-line scripts to provide useful features.
!!! note
*Consider that all inline commands below have to be executed at the root of ArGaze package folder.*
!!! note
*Use -h option to get command arguments documentation.*
## ArUco Markers factory
Export all markers from *DICT_APRILTAG_16h5* dictionary as 5 cm pictures with 300 dpi resolution into an *./src/argaze/utils/_export/markers* folder:
```shell
python ./src/argaze/utils/aruco_markers_dictionary_export.py DICT_APRILTAG_16h5 -s 5 -r 300 -o ./src/argaze/utils/_export/markers
```
Export a 7 columns and 5 rows calibration board made of 5cm squares with 3cm markers from *DICT_APRILTAG_16h5* dictionary at 300 dpi into an *./src/argaze/utils/_export* folder:
```shell
python ./src/argaze/utils/aruco_calibration_board_export.py 7 5 5 3 DICT_APRILTAG_16h5 -r 300 -o ./src/argaze/utils/_export
```
## Camera calibration
Calibrate a camera device (-d DEVICE) using a 7 columns and 5 rows calibration board made of 5cm squares with 3cm markers from *DICT_APRILTAG_16h5* dictionary. Then, export its optical parameters into an *optic_parameters.json* file into *./src/argaze/utils/demo_environment/* folder:
```shell
python ./src/argaze/utils/camera_calibrate.py 7 5 5 3 DICT_APRILTAG_16h5 -d DEVICE -o ./src/argaze/utils/demo_environment
```
!!! note
Use **A3_DICT_APRILTAG_16h5_3cm_35cmx25cm.pdf** file located in *./src/argaze/ArUcoMarkers/utils/* folder ready to be printed on A3 paper sheet.
## ArUco scene exporter
Load a MOVIE with ArUco markers inside and select image into it, detect ArUco markers belonging to DICT_APRILTAG_16h5 dictionary with 5cm size into the selected image thanks to given OPTIC_PARAMETERS and DETECTOR_PARAMETERS then, export detected ArUco markers scene as .obj file into an *./src/argaze/utils/_export/scenes* folder.
```shell
python ./src/argaze/utils/aruco_markers_scene_export.py MOVIE DICT_APRILTAG_16h5 5 OPTIC_PARAMETERS DETECTOR_PARAMETERS -o ./src/argaze/utils/_export/scenes
```
|