Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove radial distortions from images using OpenCV?

I think I should be using cv::remap to remove the distortion but can't figure out what the the maps const Mat& map1, const Mat& map2 to should be to achieve this.

Should I be using the cv::initUndistortRectifyMap to find out the values? If so, I'd really appreciate an example. I do not have the intrinsic camera parameters or don't know how to calculate them. Thanks.

like image 731
user1077213 Avatar asked Dec 02 '11 10:12

user1077213


1 Answers

If you are looking to remove the distortion caused by the camera lens you should take a look at this answer I wrote some time ago, which has intructions and references on how to do proper camera calibration.

I also suggest this post, which has good info on the procedure as well and uses the C++ interface of OpenCV.

like image 110
karlphillip Avatar answered Oct 21 '22 05:10

karlphillip