Skip to content

squirreljj/lidar-camera-fisheye-calibration

Repository files navigation

lidar-camera-fisheye-calibration

This calibration code is based on pnp algorithm.

Our algorithm support calibration between (fisheye/pinhole)camera and lidar.

Solid_state lidar is highly recommened,and do not move the devices until all data is recored. (enough sample has been collected.The num of sample better >=5)

We give two way to calibrate lidar and camera:

1)calib.py

You can manually selet pointcloud feature and image corner feature

Change the number of feature point at code :for i in range(4):

2)calib_multi.py

Image should be save as:

your_path/img/

Pcd should be save as:

your_path/pcd/

Set cropped_flag = Trueif your pointcloud haven't been processed,and then you can crop chessboard in pointcloud.

Set cropped_flag = Falseto skip the pointcloud isolation and directly calibrate.(PS:make sure chessboard pointcloud is ready)

Isolated the chessboard pointcloud as perfect as you can,a perfect pointcloud means a perfect calibration.

After crop chessboard,save pcd as cropped_1.pcd,cropped_2.pcd,cropped_3.pcd... (PS:Start from 1)

The rotation vetor and translation vetor and rotation matrix between cam and lidar would be print in terminal:

Change camera intrinsic

cv2.solvePnP support 4、5、8 distort coefficient : {[(k1,k2,p1,p2),k3],k4,k5,k6} ,fisheye use k1、k2、k3、k4,pinhole use k1,k2,p1,p2,k3 For different camera model, just change distortion vector

dist_coeffs = np.array([[-0.017815017122891635],[0.004393633105569032],[0],[0],[-0.003294336117104848],[0.0003341737432437223],[0],[0]])
np.array([[k1],[k2],[0],[0],[k3],[k4],[0],[0]]) for KB4

np.array([[k1],[k2],[p1],[p2][k3],[0],[0].[0]])for PINHOLE

Quick start

You can verify that this repository runs sucessfully by running this package on our provided quick-start data.

Folder calib for calib.py

Folder calib_multi for calib_multi.py

Reprojection

The image below shows the reprojection result:

TODO:

This algorithm is not robust enough, but it can provide a relatively reliable extrinsic. Future work will focus on improving accuracy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages