如何使用OpenCV从图像中消除径向扭曲? [英] How to remove radial distortions from images using OpenCV?

查看:779
本文介绍了如何使用OpenCV从图像中消除径向扭曲?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我应该使用 cv :: remap 来消除失真,但无法弄清楚地图 const Mat& map1,const Mat& map2 应该是为了达到这个目的。

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.

我应该使用 cv :: initUndistortRectifyMap 找出价值观?如果是这样,我真的很感激一个例子。我没有固有的相机参数或者不知道如何计算它们。谢谢。

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.

我还建议这篇文章,有很好的程序信息,并使用OpenCV的C ++接口。

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

这篇关于如何使用OpenCV从图像中消除径向扭曲?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆