# ArUco Markers

This project uses ArUco markers to define a fixed, clockwise order for a 4-corner layout:

- 0 = top-left
- 1 = top-right
- 2 = bottom-right
- 3 = bottom-left

## Generate markers

Run from the project root:

```bash
python generate_aruco_markers.py --dict DICT_4X4_50 --ids 0,1,2,3 --size 500
```

Dependencies:

- `opencv-contrib-python` (provides `cv2.aruco`)

## Size guidance (A4)

`--size` is in pixels (square). For A4 templates, markers similar to the Calligraphr sheet are small
(~0.5–0.7 in / 1.3–1.8 cm). At 300 DPI this is about 150–220 px.

Recommended defaults:

- `--size 180` for ~0.6 in (1.5 cm) at 300 DPI
- `--size 200` for ~0.67 in (1.7 cm) at 300 DPI

Output files are written to `aruco/`:

- `aruco/aruco_DICT_4X4_50_0.png`
- `aruco/aruco_DICT_4X4_50_1.png`
- `aruco/aruco_DICT_4X4_50_2.png`
- `aruco/aruco_DICT_4X4_50_3.png`

## Link markers to placement

Place the printed markers clockwise on your target surface:

- ID 0 at the top-left corner
- ID 1 at the top-right corner
- ID 2 at the bottom-right corner
- ID 3 at the bottom-left corner

This ordering is assumed whenever the markers are used to infer orientation or layout.
