Lens Distortion

カメラ座標

Pc=(XcYcZc)P_c = \left( \begin{array}{c} X_c \\ Y_c \\ Z_c \end{array} \right)
x=Xc/Zcy=Yc/Zcr2=x2+y2x' = X_c / Z_c \\ y' = Y_c / Z_c \\ r^2 = x'^2 + y'^2

歪み補正 / Distortion correction

x=x1+k1 r2+k2 r4+k3 r61+k4 r2+k5 r4+k6 r6+2p1xy+p2(r2+2x2)+s1r2+s2r4y=y1+k1 r2+k2 r4+k3 r61+k4 r2+k5 r4+k6 r6+p1(r2+2y2)+2p2xy+s1r2+s2r4x'' = x' \frac{ 1 + k_1\ r^2 + k_2\ r^4 + k_3\ r^6 }{ 1 + k_4\ r^2 + k_5\ r^4 + k_6\ r^6 } + 2 p_1 x' y' + p_2 (r^2 + 2 x'^2) + s_1 r^2 + s_2 r^4 \\ y'' = y' \frac{ 1 + k_1\ r^2 + k_2\ r^4 + k_3\ r^6 }{ 1 + k_4\ r^2 + k_5\ r^4 + k_6\ r^6 } + p_1 (r^2 + 2 y'^2) + 2 p_2 x' y' + s_1 r^2 + s_2 r^4

カメラ座標変換

(uv)=(fx0cx0fycy)(xy1)\left( \begin{array}{c} u \\ v \end{array} \right) = \left( \begin{array}{ccc} f_x & 0 & c_x \\ 0 & f_y & c_y \\ \end{array} \right) \left( \begin{array}{c} x'' \\ y'' \\ 1 \end{array} \right)