← Back to Home

Plate Calibration User Guide

This guide walks you through the camera calibration process using a calibration plate (dot grid) in OpenLPT. The process consists of two main stages: Point Detection and Calibration.

1. Point Detection

First, select the Plate Calibration tab and ensure you are on the Point Detection sub-tab.

Point Detection Interface

Step 1: Configure Camera Settings

Set the camera parameters in the Camera Images panel:

Step 2: Load Calibration Images

  1. Click Open Files to select one or more calibration plate images for the target camera.
  2. Images will appear in the Frame List below.
  3. Click on any frame to preview it in the left panel.

Step 3: Configure Detection Settings

In the Detection Settings panel:

Step 4: Detect Points

  1. Click Detect to run template matching on the current image.
  2. Verification: Look at the image view on the left. You should see green crosses marking all detected dots.
  3. If detection is incorrect:
    • Click Remove to clear all detected points.
    • Adjust the Match Threshold or select a better template.
  4. Click Add to manually add individual points by clicking on the image.

Step 5: Index Points (Assign 3D Coordinates)

In the Indexing panel, assign world coordinates to detected points:

  1. Set Origin: Click this button, then click on a detected point to mark it as the origin (0, 0, 0).
  2. Fixed Axis: Select which axis is fixed for this plane:
    • Z fixed (default): For a horizontal plate at a known Z-plane.
    • X or Y fixed: For vertical plates.
  3. Plane: Enter the value of the fixed axis (e.g., 0 for Z=0 plane).
  4. Set Axis Directions: Click this button, then click two points to define the positive X and Y directions. A hint will follow your mouse showing which axis to click.
  5. Index Points: Click to automatically assign indices to all detected points based on the origin and axis directions.

Step 6: Configure Physical Spacing

Set the physical spacing between dots:

Click Check Position to verify the 3D world coordinates are correct by clicking on a point.

Step 7: Add to Calibration Data

  1. When satisfied with the indexing, click Add to Calibration Data.
  2. Repeat Steps 2-7 for all calibration images and all cameras.
Important: Each camera can have multiple images at different planes. The more images you add, the more robust the calibration will be.

2. Calibration

After adding points for all cameras, switch to the Calibration sub-tab.

Calibration Interface

Step 8: Configure Camera Settings

In the Camera Settings panel:

Step 9: Run Calibration

  1. Click Run Calibration.
  2. The system will perform a two-stage optimization:
    • Stage 1: Estimate camera pose using solvePnP.
    • Stage 2: Refine intrinsics and extrinsics using bundle adjustment.
  3. The 3D View on the left will visualize the camera positions and calibration points.
  4. Check the Mean RMS Error in the Calibration Results section (should be < 1.0 px for good calibration).

Step 10: Calibrate All Cameras

  1. Change the Target Camera to the next camera.
  2. Click Run Calibration again.
  3. Repeat for all cameras.
  4. The 3D View will accumulate all calibrated cameras, showing their relative positions.

Step 11: Save Results

  1. When all cameras are calibrated, click Save All Camera Parameters.
  2. Select an output directory.
  3. A camFile folder will be created containing:
    • cam0.txt - Camera 0 parameters
    • cam1.txt - Camera 1 parameters
    • cam2.txt - Camera 2 parameters
    • ...
Parameter File Format: The saved files are compatible with OpenLPT's tracking module and contain camera matrix, distortion coefficients, rotation matrix, and translation vector.

Troubleshooting

High RMS Error

Points Not Detected