blob: 975f278142ddce732817fc580c11f5d8f0a0496d (
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
|
Improve ArUco marker detection
===============================
As explain in the [OpenCV ArUco documentation](https://docs.opencv.org/4.x/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html), ArUco marker detection is highly configurable.
## Load ArUcoDetector parameters
[ArUcoCamera.detector.parameters](../../../argaze.md/#argaze.ArUcoMarker.ArUcoDetector.Parameters) can be loaded thanks to a dedicated JSON entry.
Here is an extract from the JSON [ArUcoCamera](../../../argaze.md/#argaze.ArUcoMarker.ArUcoCamera) configuration file with ArUco detector parameters:
```json
{
"argaze.ArUcoMarker.ArUcoCamera.ArUcoCamera": {
"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}')
```
|