Skip to main content

Camera Calibration Guide

Requirements

  1. Working Camera: Ensure the camera is calibrated and has a focused lens.
  2. Data Recording Setup: Use a method to record raw camera images to a ROS bag. Ideally, utilize the UAV's NUC.
  3. Calibration Pattern: Use the provided calibration pattern.
  4. Calibration Software: Employ the Kalibr software for processing.

Setup Instructions

  1. Locate a Calibration Pattern:

    • Look for an existing calibration pattern mounted on a wall or box.
    • If unavailable, print out the calibration pattern.
  2. Prepare the Calibration Pattern:

    • Print the pattern and measure distances as shown in this image:
      img
    • Attach the pattern to a flat surface to ensure accuracy.
    • Write down the pattern’s measurements on the paper for future reference.
  3. Ensure Stability:

    • The pattern must remain flat and stationary during calibration.
    • Any movement, twisting, or curling will invalidate the calibration.

Recording Data

  1. Preview the Camera Feed:

    • Use tools like rviz or rqt_image_view to verify the camera is pointing correctly.
  2. Record the ROS Bag:

    • Start recording and move the camera around to capture the calibration pattern.
    • Ensure to:
      • Cover different distances.
      • Capture the pattern from all sides.
      • Cover the camera’s entire field of view (FOV).
      • Keep the entire pattern visible in every frame.
  3. Tips for Recording:

    • Include corner coverage:

      img

    • Capture skewed views from sides, top, and bottom:

      img

    • Record at varied distances:

      img img

    • Duration: Depending on framerate, usually a few minutes is fine, it is good to aim for 200+ usable frames.


Calibration Process

  1. Follow the README instructions in the Kalibr Docker repository to perform the calibration.

  2. Save the calibration results:

    • Store them in the customer’s example session (F4F).
    • Link the calibration data to the appropriate camera launch file.
  3. Verify the Calibration:

    • Confirm the camera calibration is correctly applied when launching the camera driver node.