如何使用 OpenCV 消除图像中的径向畸变?
我认为我应该使用 cv::remap 来消除失真,但无法弄清楚映射 const Mat& 的内容是什么。 map1, const Mat& map2 应该可以实现这一点。
我应该使用 cv::initUn DistorifyMap
来找出这些值吗?如果是这样,我真的很感激一个例子。我没有相机的内在参数或不知道如何计算它们。谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想消除相机镜头造成的失真,您应该看看我前段时间写的这个答案 ,其中包含有关如何进行正确的相机校准的说明和参考。
我还建议这篇文章,其中提供了有关该过程的良好信息以及使用 OpenCV 的 C++ 接口。
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.