Camera calibration (CSI)

Camera calibration (CSI)1. Start the camera2. Image calibration2.1. Calibration board2.2. View topics2.3, Image calibration2.3.1, Install the image calibration tool2.3.2, Start the image calibration tool2.3.3, Calibration process2.3.4, Calibration results

1. Start the camera

image-20250115093803097

2. Image calibration

2.1. Calibration board

image-20250108190030306

2.2. View topics

image-20250115093853125

2.3, Image calibration

2.3.1, Install the image calibration tool

image-20250115093941501

2.3.2, Start the image calibration tool

Start the ROS2 camera calibration tool camera_calibration and perform camera calibration: You need to start the camera before calibration

Parameter Description

--size: Number of inner corner points of the chessboard → 9 rows and 6 columns of inner corner points

--square: Side length of the chessboard → 0.02 meters

--ros-args: Pass ROS parameters

--remap: Topic remapping → /image_raw as image input stream

image-20250115094432072

2.3.3, Calibration process

image-20250115144731332

Parameter Description

X: The chessboard moves left and right in the camera field of view

Y: The chessboard moves up and down in the camera field of view

Size: The chessboard moves forward and backward in the camera field of view

Skew: The chessboard tilts and rotates in the camera field of view

When X, Y, Size, and Skew turn green, you can click CALIBRATE to calculate the camera internal parameters: the more images you calibrate, the longer it takes, and the program may freeze

image-20250115144831335

image-20250115145200408

After calibration, click SAVE to save the results!

image-20250115145318057

Close the program after successful saving!

2.3.4, Calibration results

Default save location and file name of calibration results:

Copy and decompress the calibration results:

The decompressed files contain the calibration *.png, ost.yaml and ost.txt files. We mainly copy the data in the ost.yaml file to the camera_usb.yaml file.

ost.yaml

Replace the camera_usb.yaml file data with image_width, image_height, data in camera_matrix, data in projection_matrix, and data in distortion_coefficients.

camera_csi.yaml

Modified file: