diff options
author | Théo de la Hogue | 2023-09-06 10:01:12 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-09-06 10:01:12 +0200 |
commit | 935ca70dfa1cde21b6c3c43659db3dcac3223c44 (patch) | |
tree | e8f8a984058261ce7cd37eee1c0e0a62aaa4b349 /docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md | |
parent | 067b3c6dc2588be4c4e416f4f07b7dd45cf1bc67 (diff) | |
download | argaze-935ca70dfa1cde21b6c3c43659db3dcac3223c44.zip argaze-935ca70dfa1cde21b6c3c43659db3dcac3223c44.tar.gz argaze-935ca70dfa1cde21b6c3c43659db3dcac3223c44.tar.bz2 argaze-935ca70dfa1cde21b6c3c43659db3dcac3223c44.tar.xz |
Renaming aruco markers pipeline chapter. Working on aruco camera configuratin chapter.
Diffstat (limited to 'docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md')
-rw-r--r-- | docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md b/docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md deleted file mode 100644 index ee5cca7..0000000 --- a/docs/user_guide/aruco_markers_pipeline/aruco_scene_creation.md +++ /dev/null @@ -1,130 +0,0 @@ -Build ArUco markers scene -========================= - -First of all, ArUco markers needs to be printed and placed into the scene. - -## Print ArUco markers from a ArUco dictionary - -ArUco markers always belongs to a set of markers called ArUco markers dictionary. - -![ArUco dictionaries](../../img/aruco_dictionaries.png) - -Many ArUco dictionaries exist with properties concerning the format, the number of markers or the difference between each markers to avoid error in tracking. - -Here is the documention [about ArUco markers dictionaries](https://docs.opencv.org/3.4/d9/d6a/group__aruco.html#gac84398a9ed9dd01306592dd616c2c975). - -The creation of [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) pictures from a dictionary is illustrated in the code below: - -``` python -from argaze.ArUcoMarkers import ArUcoMarkersDictionary - -# Create a dictionary of specific April tags -aruco_dictionary = ArUcoMarkersDictionary.ArUcoMarkersDictionary('DICT_APRILTAG_16h5') - -# Export marker n°5 as 3.5 cm picture with 300 dpi resolution -aruco_dictionary.create_marker(5, 3.5).save('./markers/', 300) - -# Export all dictionary markers as 3.5 cm pictures with 300 dpi resolution -aruco_dictionary.save('./markers/', 3.5, 300) -``` - -!!! note - There is **A4_DICT_APRILTAG_16h5_5cm_0-7.pdf** file located in *./src/argaze/ArUcoMarkers/utils/* folder ready to be printed on A4 paper sheet. - -Let's print some of them before to go further. - -!!! warning - Print markers with a blank zone around them to help in their detection. - -## Describe ArUco markers place - -Once [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) pictures are placed into a scene it is possible to describe their 3D places into a file. - -![ArUco scene](../../img/aruco_scene.png) - -Where ever the origin point is, all markers places need to be described in a [right-handed 3D axis](https://robotacademy.net.au/lesson/right-handed-3d-coordinate-frame/) where: - -* +X is pointing to the right, -* +Y is pointing to the top, -* +Z is pointing to the backward. - -!!! warning - All ArUco markers spatial values must be given in **centimeters**. - -### Edit OBJ file description - -OBJ file format could be exported from most 3D editors. - -``` obj -o DICT_APRILTAG_16h5#0_Marker -v -5.000000 14.960000 0.000000 -v 0.000000 14.960000 0.000000 -v -5.000000 19.959999 0.000000 -v 0.000000 19.959999 0.000000 -vn 0.0000 0.0000 1.0000 -s off -f 1//1 2//1 4//1 3//1 -o DICT_APRILTAG_16h5#1_Marker -v 25.000000 14.960000 0.000000 -v 30.000000 14.960000 0.000000 -v 25.000000 19.959999 0.000000 -v 30.000000 19.959999 0.000000 -vn 0.0000 0.0000 1.0000 -s off -f 5//2 6//2 8//2 7//2 -o DICT_APRILTAG_16h5#2_Marker -v -5.000000 -5.000000 0.000000 -v 0.000000 -5.000000 0.000000 -v -5.000000 0.000000 0.000000 -v 0.000000 0.000000 0.000000 -vn 0.0000 0.0000 1.0000 -s off -f 9//3 10//3 12//3 11//3 -o DICT_APRILTAG_16h5#3_Marker -v 25.000000 -5.000000 0.000000 -v 30.000000 -5.000000 0.000000 -v 25.000000 0.000000 0.000000 -v 30.000000 0.000000 0.000000 -vn 0.0000 0.0000 1.0000 -s off -f 13//4 14//4 16//4 15//4 -``` - -Here are common OBJ file features needed to describe ArUco markers places: - -* Object lines (starting with *o* key) indicate markers dictionary and id by following this format: **DICTIONARY**#**ID**\_Marker. -* Vertice lines (starting with *v* key) indicate markers corners. The marker size will be automatically deducted from the geometry. -* Plane normals (starting with *vn* key) need to be exported for further pose estimation. -* Face (starting with *f* key) link vertices and normals indexes together. - -!!! warning - All markers must have the same size and belong to the same dictionary. - -### Edit JSON file description - -JSON file format allows to describe markers places using translation and euler angle rotation vectors. - -``` json -{ - "dictionary": "DICT_APRILTAG_16h5", - "marker_size": 5, - "places": { - "0": { - "translation": [-2.5, 17.5, 0], - "rotation": [0.0, 0.0, 0.0] - }, - "1": { - "translation": [27.5, 17.5, 0], - "rotation": [0.0, 0.0, 0.0] - }, - "2": { - "translation": [-2.5, -2.5, 0], - "rotation": [0.0, 0.0, 0.0] - }, - "3": { - "translation": [27.5, -2.5, 0], - "rotation": [0.0, 0.0, 0.0] - } - } -} -``` |