user1077213
user1077213

Reputation: 219

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.

Upvotes: 8

Views: 22630

Answers (1)

karlphillip
karlphillip

Reputation: 93410

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.

Upvotes: 8

Related Questions