Solved

Distortion: 如何获得相机校正算法中用到的畸变参数

  • 17 January 2022
  • 1 reply
  • 538 views

Userlevel 4
Badge +2

在相机校正中使用算法对图片进行畸变校正时,需要使用如以下链接中所描述的畸变参数,如何从OpticStudio中来获取这些参数? 

https://docs.opencv.org/4.x/d4/d94/tutorial_camera_calibration.html

https://www.mathworks.com/help/vision/ug/camera-calibration.html

 

x_distorted = x(1 + k1*r2 + k2*r4 + k3*r6)

y_distorted= y(1 + k1*r2 + k2*r4 + k3*r6)

icon

Best answer by Julia 17 January 2022, 03:50

View original

1 reply

Userlevel 4
Badge +2

参数k1, k2, k3的确定可通过对一组畸变值的拟合来获取。

OpticStudio中的Grid Distortion分析中包含了畸变数据,以及predicted/read X/Y信息。

这些数值都可通过相应的操作数(如使用REAX/REAY & PARX/PARY)来提取并可点击Grid Distortion> Text tab来查看。

 

上面公式中的x,y 是归一化像面坐标。OS中提取的X/Y值是非归一化像面坐标,应做相应的转化后再拟合。

OpticStudio中没有数据拟合求得参数的功能。

因此拟合这一部分可通过其他软件如Matlab/Mathematics来实现。

以下供参考: 

Matlab: https://stackoverflow.com/questions/44052831/how-to-find-radial-distortion-coefficients-between-two-sets-of-points

 

Reply