Interactively estimate rigid transformation between lidar sensor and camera
The Lidar Camera Calibrator app enables you to interactively
estimate the rigid transformation between a lidar sensor and a camera. The app performs
calibration by reading the calibration images and point clouds captured by the user. The app
reads point cloud data in the PLY and PCD formats, and images in any format supported by
Using the app, you can:
Detect, extract, and visualize checkerboard features from image and point cloud data.
Estimate the rigid transformation between the camera and the lidar using feature detection results.
Use the calibration results to fuse data from both the sensors. You can visualize point cloud data projected onto the images, and color or grayscale information from the images fused with point cloud data.
View the plotted calibration error metrics. You can remove outliers, using a threshold line, and recalibrate the remaining data.
Define a region of interest (ROI) around the checkerboard to reduce the computation resources required by the transformation estimation process.
Export the transformation and error metric data as workspace variables or MAT files. You can also create a MATLAB® script for the entire workflow.
MATLAB Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the app icon.
MATLAB command prompt: Enter
Define paths to the image and point cloud files.
imageFilesPath = fullfile(toolboxdir('lidar'),'lidardata',... 'lcc','vlp16','images'); pcFilesPath = fullfile(toolboxdir('lidar'),'lidardata',... 'lcc','vlp16','pointCloud');
Load the checker size and padding values of the checkerboard.
checkerSize = 81; % millimeters padding = [0 0 0 0]; % millimeters
Launch the app with these parameters.
lidarCameraCalibrator opens a new session of the Lidar Camera
lidarCameraCalibrator( opens the
Lidar Camera Calibrator app and loads a previously saved app session,
opens a new session of the app and loads the specified input data. The app reads image files
imageFilesPath and point cloud files from
pcFilesPath. Both of these arguments must be valid folders containing
images and point clouds, respectively.
checkerSize is the square
checker dimension of the checkerboard used in calibration and
contains the padding values of the checkerboard, specified as a positive numeric scalar in
The Lidar Camera Calibrator app has these limitations:
The point cloud axes tools and overall responsiveness are slow in Linux® machines.
The script generated from Export > Generate MATLAB Script does not contain any manually selected checkerboard regions using the Select Checkerboard feature. In the script, the checkerboard region is detected in the specified ROI.
After manually selected checkerboard regions using the Select Checkerboard feature, when the user comes back to the Calibration tab, you can see the selected points (highlighted in red) only while viewing the whole point cloud (i.e. when SnapToROI button is unselected).