aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/aruco_markers_pipeline/advanced_topics/aruco_detector_configuration.md
blob: 410e2d7d8db68a705dbf259d6fd2175931e2a0a8 (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
Improve ArUco markers detection
===============================

As explain in [OpenCV ArUco documentation](https://docs.opencv.org/4.x/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html), ArUco markers detection is highly configurable.

## Load ArUcoDetector parameters

[ArUcoCamera.detector.parameters](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.Parameters) can be loaded thanks to a dedicated JSON entry.

Here is an extract from the JSON [ArUcoCamera](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) configuration file with ArUco detector parameters:

```json
{
    "name": "My FullHD camera",
    "size": [1920, 1080],
    "aruco_detector": {
        "dictionary": "DICT_APRILTAG_16h5",
        "parameters": {
		    "adaptiveThreshConstant": 10,
            "useAruco3Detection": 1
		}
    },
    ...
```

## Print ArUcoDetector parameters

```python
# Assuming ArUcoCamera is loaded
...

# Print all ArUcoDetector parameters
print(aruco_camera.aruco_detector.parameters)

# Print only modified ArUcoDetector parameters
print(f'{aruco_camera.aruco_detector.parameters:modified}')
```