Camera calibration¶
RGB¶
Use ROS2 internal camera calibration tool:
ros2 run camera_calibration cameracalibrator --size 7x9 --square 0.015 --no-service-check --ros-args -r image:=/rgb/image_raw
Thermal¶
Thermal cameras can’t see printed patterns, so instead we use a heat-transparent target: holes drilled through a chessboard let heat from an oven plate shine through, creating a regular grid of hot spots the thermal sensor can detect.
What you need¶
Heated oven plate
Printed chessboard affixed to a wooden board
Drill (to make holes at every grid intersection)
Thermal camera with PNG export
Python with opencv-python, numpy, tqdm
Steps¶
Build the target — mount the printed chessboard on a wooden board and drill a small hole at every grid intersection.
Set up the heat source — place the board on the heated oven plate, holes facing up toward the camera.
Capture images — photograph the target from at least 15–20 different angles and distances.
Configure the script — set gridPointsWidth, gridPointsHeight, gridPointsDist, and the path to your images.
Run the calibration — execute the script; it outputs the intrinsic matrix and distortion coefficients.
Verify — reprojection error below ~1.0 px indicates a good calibration.
python ws/src/HorizonScanner/sarcam_detector/sarcam_detector/modules/thermal_intrinsic_calib.py