ehong-tl / camera_2d_lidar_calibration

ROS camera 2D Lidar extrinsic calibration tool
61 stars 19 forks source link

Why in camera_lidar_calibration.py script distortion coefficient is an array of zeros? #1

Closed shubhamwagh closed 5 years ago

shubhamwagh commented 5 years ago

Hi! Thanks for this ros package. May I know why do you assume distortion coefficient to be array of zeros? This is given as input in cv2.solvePnP function.

Thanks.

ehong-tl commented 5 years ago

Hi! Thanks for this ros package. May I know why do you assume distortion coefficient to be array of zeros? This is given as input in cv2.solvePnP function.

Thanks.

Hi @shubhamwagh ,

It's because cv2.solvePnP assumes your distortion coefficient is from OpenCV standard camera calibration (pinhole model). So to make it also usable for OpenCV fisheye model, I assume the distortion coefficient input to solvePnP function to be 0, in conjunction with the image points input to solvePnP is from undistorted image points.