8

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.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
user1077213
  • 209
  • 2
  • 4
  • 6

1 Answers1

8

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.

Community
  • 1
  • 1
karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • Yes I'm trying to remove distortion from the lens. Going over the links now :) – user1077213 Dec 02 '11 at 18:59
  • The second link is dead, unfortunetly. Could you provide a new one? – Petersaber Jul 09 '15 at 11:58
  • 1
    [Wayback Machine](http://web.archive.org/web/20140223092539/http://www.aishack.in/2010/07/calibrating-undistorting-with-opencv-in-c-oh-yeah). – karlphillip Jul 09 '15 at 14:46
  • 1
    @karlphillip magnificent – Petersaber Jul 10 '15 at 08:45
  • Turns out that the page is not gone, just moved. [New location](http://www.aishack.in/tutorials/calibrating-undistorting-with-opencv-in-c-oh-yeah/) but unfortunately still have to use wayback machine to download the full-size checkerboard. – Ryan Pavlik Aug 14 '15 at 17:52
  • Hi, I post my question here as a comment because I think it might not get a lot of attention. Camera calibration is something very specific. I read the answers you provided but unfortunately was unable to use this info in my situation. Would it be possible for you to share your insights? https://stackoverflow.com/questions/46225943/how-to-correctly-calibrate-my-camera-with-a-wide-angle-lens-using-opencv – privetDruzia Sep 14 '17 at 18:55
  • 1
    @privetDruzia It's been 6 years since I last played with this. Sorry, my memory is quite terrible. Good luck! – karlphillip Sep 14 '17 at 20:24