aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/aruco_markers_pipeline/aoi_3d_description.md
blob: b02bc9e901ba820a7b70d368e25e290d39f26297 (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
44
45
46
47
48
49
50
51
52
53
Describe 3D AOI
===============

Now [scene pose is estimated](aruco_markers_description.md) thanks to ArUco markers description, [areas of interest (AOI)](../../argaze.md/#argaze.AreaOfInterest.AOIFeatures.AreaOfInterest) need to be described into the same 3D referential.

In the example scene, the screen and the sheet are considered as areas of interest.

![3D AOI description](../../img/aoi_3d_description.png)

All AOI need to be described from same origin than markers 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 AOI spatial values must be given in **centimeters**.

### Edit OBJ file description

OBJ file format could be exported from most 3D editors.

``` obj
o Sheet
v 14.200000 -3.000000 28.350000
v 35.200000 -3.000000 28.350000
v 14.200000 -3.000000 -1.35
v 35.200000 -3.000000 -1.35
f 1 2 4 3
o Screen
v 2.750000 2.900000 -0.500000
v 49.250000 2.900000 -0.500000
v 2.750000 29.100000 -0.500000
v 49.250000 29.100000 -0.500000
f 5 6 8 7
```

Here are common OBJ file features needed to describe AOI:  

* Object lines (starting with *o* key) indicate AOI name.
* Vertice lines (starting with *v* key) indicate AOI vertices.
* Face (starting with *f* key) link vertices together.

### Edit JSON file description

JSON file format allows to describe AOI vertices.

``` json
{
    "Sheet": [[14.2, -3, 28.35], [35.2, -3, 28.35], [14.2, -3, -1.35], [35.2, -3, -1.35]],
    "Screen": [[2.75, 2.9, -0.5], [49.25, 2.9, -0.5], [2.75, 29.1, -0.5], [49.25, 29.1, -0.5]]
}
```