# LED stage synchronization

Before presenting content on an LED stage with AR 51, you may want to synchronize AR 51’s coordinate system with the LED system.  

This ensures a consistent origin across sessions and allows direct alignment with LED walls or floors.  

---

---

## Motivation

You want to present something on the LED stage and synchronize AR 51 with another system.  

Examples include:

- Use your body to control the content that is displayed on the LED wall/floor.  

- Ensuring the AR 51 origin is placed consistently in the same spot each time.  

![LED stage synchronization — Calibration board on stage](./img/led_sync/calibration_board_on_stage.webp)  

---

## Using AR 51's Aruco Style checkerboard pattern

### AR 51 Server Settings

- In the AR 51 server settings:  

  - Navigate to:  

    `Camera Calibration Settings` → `Checker Board Settings` → **Calibration Method**  

  - Select **Charuco** from the dropdown menu.  

    ![LED stage synchronization — Server settings charuco](./img/led_sync/server_settings_charuco.png)

  - - Navigate to:  

    `Camera Calibration Settings` → `Checker Board Settings` → **`Board Square Count`**  

  - Set **Board Square Count** to reflect your number of corners on the board (**8x5** in the attached file, note this is the corners not the actual squares count).

    ![LED stage synchronization — Server settings charuco num tags](./img/led_sync/server_settings_charuco_num_tags.png)

  - **Save** the server settings if you want this to persist.

### Projecting the Checkerboard

To sync AR 51 coordinates with the LED stage:  

1. Project the provided checkerboard image onto the LED floor.  

   - <a href="/downloads/CalibrationBoard_With_Colors.zip" download>Download the checkerboard image</a>   

   - The small mark at the center of the checkerboard indicates the AR 51 origin.  

2. AR 51 uses a **right-hand coordinate system** where **Y is up**.  

![LED stage synchronization — CalibrationBoard With Colors origin highlighted](./img/led_sync/CalibrationBoard_With_Colors_origin_highlighted.png)  

---

## Using AprilTag Style checkerboard pattern

### AR 51 Server Settings

- In the AR 51 server settings:  

  - Navigate to:  

    `Camera Calibration Settings` → `Checker Board Settings` → **`Calibration Method`**  

  - Select **AprilTags** from the dropdown menu.  

    ![LED stage synchronization — Server settings apriltags](./img/led_sync/server_settings_apriltags.png)

  - Navigate to:  

    `Camera Calibration Settings` → `Checker Board Settings` → **`Board Square Count`**  

  - Set **Board Square Count** to reflect your number of squares on the board (**10x15** in the attached file).

  

    ![LED stage synchronization — Server settings apriltags num tags](./img/led_sync/server_settings_apriltags_num_tags.png)

  - **Save** the server settings if you want this to persist.

### Projecting the Checkerboard

To sync AR 51 coordinates with the LED stage:  

1. Project the provided april tags image onto the LED floor.  

   - <a href="/downloads/AprilTagCalibrationBoard_With_Colors.zip" download>Download the april tags checkerboard image</a>   

   - The center of the board is AR 51's system origin.  

2. AR 51 uses a **right-hand coordinate system** where **Y is up**.  

![LED stage synchronization — AprilTags origin highlighted](./img/led_sync/AprilTags_origin_highlighted.png)  

---

:::warning
## Rescaling the Checkerboard

- Measure the a calibration square in the "real world"

When you measure your "real world" checkerboard square make sure to measure the entire square - **Not just the inner aruco area**. You can also measure the pattern from side to side and divide by the number of squares for better accuracy.

:::

| Standard Calibration Board                                                                 | AprilTags Calibration Board                                           |
|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| ![LED stage synchronization — CalibrationBoardSingleSquareHighlighted](./img/led_sync/CalibrationBoardSingleSquareHighlighted.png) | ![LED stage synchronization — SquareSizeAprilTag](./img/led_sync/SquareSizeAprilTag.png) |

- You may rescale the checkerboard, but it must be **uniform** so that each square remains a square.  

- In the AR 51 server settings:  

  - Navigate to:  

    `Camera Calibration Settings` → `Checker Board Settings` → **`Aruco Board Square Size Meters`**  

  - Enter the real-world size of a checker square (in meters).  

:::warning
When you measure your "real world" checkerboard square make sure to measure the entire square - **Not just the inner aruco area**. You can also measure the pattern from side to side and divide by the number of squares for better accuracy.

:::

![LED stage synchronization — Aruco settings](./img/led_sync/aruco_settings.png)  

---

## Handling Coordinate Offsets

If the LED coordinate system is not centered on the stage (e.g., origin is in the upper-right corner), you can adjust using:  

- `Camera Calibration Settings` → **Calibration Checkerboard Offset**  

- Set the offset values so AR 51 matches the LED system’s origin.  

![LED stage synchronization — Coordinate offset](./img/led_sync/coordinate_offset.png)  

---
