Main Content

Lidar Camera Calibrator

Interactively establish correspondences between lidar sensor and camera to fuse sensor data

Since R2021a

Description

The Lidar Camera Calibrator app interactively performs calibration using images and point clouds captured by a camera and a lidar sensor, respectively to estimate a rigid transformation between them. You can use the transformation matrix to fuse the lidar and camera data or project lidar points onto images.

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.

Lidar Camera Calibrator App Session

Open the Lidar Camera Calibrator App

  • MATLAB Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the app icon.

  • MATLAB command prompt: Enter lidarCameraCalibrator.

Examples

expand all

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(imageFilesPath,pcFilesPath,checkerSize,padding)

Related Examples

Programmatic Use

expand all

lidarCameraCalibrator opens a new session of the Lidar Camera Calibrator app.

lidarCameraCalibrator(sessionFile) opens the Lidar Camera Calibrator app and loads a previously saved app session, sessionFile.

lidarCameraCalibrator(imageFilesPath,pcFilesPath,checkerSize,padding) opens a new session of the app and loads the specified input data. The app reads image files from 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 padding contains the padding values of the checkerboard, specified as a positive numeric scalar in millimeters.

Limitations

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 selecting checkerboard regions using the Select Checkerboard feature, when you return to the Calibration tab, you can see the selected points (highlighted in red) only while viewing the whole point cloud (when Snap To ROI is cleared).

Version History

Introduced in R2021a