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.
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.