使用Matlab中的单个校准图像校正镜头失真 [英] Correct lens distortion using single calibration image in Matlab

查看:294
本文介绍了使用Matlab中的单个校准图像校正镜头失真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想纠正一系列图像上的镜头扭曲。所有图像都是在相机固定到位的情况下拍摄的,并且也可以使用相同设置的棋盘图像。

I would like to correct lens distortions on a series of images. All the images were captured with the camera fixed in place, and a checkerboard image from the same set up is also available.

在检测到扭曲的棋盘图像的角落后,我想计算径向失真系数,以便我可以校正图像。
类似于 estimateCameraParameters 功能。

After detecting the corners of the distorted checkerboard image, I would like to compute the radial distortion coefficients so that I can correct the images. Similar to the estimateCameraParameters function.

理想情况下,我想使用类似于Matlab的方法相机校准但是这似乎不适用于只有一个校准图像可用的情况(并且图像都是从同一位置捕获的)。

Ideally, I would like to use a method similar to Matlab camera calibration however this does not seem to work for cases where only a single calibration image is available (and the images were all captured from the same location).

感谢任何帮助。

推荐答案

镜头扭曲的校正只取决于相机本身,而不是相机的位置(一个也讲到内在的相机参数)。因此,一个图像(具有足够的参考点)足以计算这组参数。

The correction of lens distorsion only depends on the camera itself, not the position of the camera (one speaks also about intrinsic camera parameters). So one image (with enough reference points) is enough to compute this set of parameters.

如果仅考虑径向扭曲,一个简单的例子是修正扭曲中心(通常在图像的中心),您的模型可以像 R'= R *(1 + a * R ^ 2 + b * R ^ 4)。首先使用extrisic相机参数校正图像,以消除所有单调的扭曲。首先估计相机姿势非常重要。

If you consider only radial distorsion, a simple case is to fix the center of distorsion (commonly at the center of the image), your model can be like R' = R*(1+a*R^2+b*R^4). First correct the image with extrisic camera parameters, to remove all homographic distorsion. Estimating the camera pose first is really important.

拥有棋盘点的位置,你可以计算它们到扭曲中心(R')的距离,以及您期望的相应距离(R)。然后你有一组线性方程,所以可以用SVD很好地找到解决方案。

Having the positions of the points of the chessboard, you can compute their distances to the center of distorsion (R'), and the corresponding distances you expect (R). Then you have a set of linear equations, so the solution can be robustly found with SVD for example.

一个更复杂的方法用 OpenCV文档

这篇关于使用Matlab中的单个校准图像校正镜头失真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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