optimal after epipolar

since ∣ ∣ n ∣ ∣ ⋅ ∣ ∣ t ∣ ∣ − ∣ ∣ n ⋅ t ∣ ∣ = Σ n x 2 Σ t x 2 − Σ ( n x t x ) 2 = ( n y 2 + n z 2 ) t x 2 + ( n x 2 + n z 2 ) t y 2 + ( n x 2 + n y 2 ) t z 2 ||n||\cdot||t||-||n\cdot t|| \\= \Sigma n_x^2\Sigma t_x^2-\Sigma (n_xt_x)^2 \\=(n_y^2+n_z^2)t_x^2+(n_x^2+n_z^2)t_y^2+(n_x^2+n_y^2)t_z^2 ∣∣n∣∣∣∣t∣∣∣∣nt∣∣=Σnx2Σtx2Σ(nxtx)2=(ny2+nz2)tx2+(nx2+nz2)ty2+(nx2+ny2)tz2

so ∣ ∣ n ∣ ∣ ⋅ ∣ ∣ X − t ∣ ∣ − ∣ ∣ n ⋅ ( X − t ) ∣ ∣ = ( n y 2 + n z 2 ) ( x − t x ) 2 + ( n x 2 + n z 2 ) ( y − t y ) 2 + ( n x 2 + n y 2 ) ( z − t z ) 2 = [ x   y   z   1 ] [ n y 2 + n z 2 0 0 − ( n y 2 + n z 2 ) t x 0 n x 2 + n z 2 0 − ( n x 2 + n z 2 ) t y 0 0 n x 2 + n y 2 − ( n x 2 + n y 2 ) t z − ( n y 2 + n z 2 ) t x − ( n x 2 + n z 2 ) t y − ( n x 2 + n y 2 ) t z Σ x ( n y 2 + n z 2 ) t x 2 ] [ x y z 1 ] ||n||\cdot||X-t||-||n\cdot (X-t)|| \\=(n_y^2+n_z^2)(x-t_x)^2+(n_x^2+n_z^2)(y-t_y)^2+(n_x^2+n_y^2)(z-t_z)^2 \\=\begin{bmatrix}x\ y\ z\ 1\end{bmatrix}\begin{bmatrix}n_y^2+n_z^2 & 0 & 0 & -(n_y^2+n_z^2)t_x \\0&n_x^2+n_z^2&0&-(n_x^2+n_z^2)t_y\\0&0&n_x^2+n_y^2&-(n_x^2+n_y^2)t_z\\ -(n_y^2+n_z^2)t_x &-(n_x^2+n_z^2)t_y&-(n_x^2+n_y^2)t_z&\Sigma_x(n_y^2+n_z^2)t_x^2\end{bmatrix}\begin{bmatrix}x\\y\\z\\1\end{bmatrix} ∣∣n∣∣∣∣Xt∣∣∣∣n(Xt)∣∣=(ny2+nz2)(xtx)2+(nx2+nz2)(yty)2+(nx2+ny2)(ztz)2=[x y z 1] ny2+nz200(ny2+nz2)tx0nx2+nz20(nx2+nz2)ty00nx2+ny2(nx2+ny2)tz(ny2+nz2)tx(nx2+nz2)ty(nx2+ny2)tzΣx(ny2+nz2)tx2 xyz1

then
Σ i = 0 3 d i 2 = Σ i ∣ ∣ n i ∣ ∣ ⋅ ∣ ∣ X − t i ∣ ∣ − ∣ ∣ n ⋅ ( X − t i ) ∣ ∣ = [ x   y   z   1 ] [ Σ i ( n y i ) 2 + ( n z i ) 2 0 0 − Σ i ( ( n y i ) 2 + ( n z i ) 2 ) t x i 0 Σ i ( n x i ) 2 + ( n z i ) 2 0 − Σ i ( ( n x i ) 2 + ( n z i ) 2 ) t y i 0 0 Σ i ( n x i ) 2 + ( n y i ) 2 − Σ i ( ( n x i ) 2 + ( n y i ) 2 ) t z i − Σ i ( ( n y i ) 2 + ( n z i ) 2 ) t x i − Σ i ( ( n x i ) 2 + ( n z i ) 2 ) t y i − Σ i ( ( n x i ) 2 + ( n y i ) 2 ) t z i Σ i Σ x ( ( n y i ) 2 + ( n z i ) 2 ) t x 2 ] [ x y z 1 ] \Sigma_{i=0}^{3} d_i^2 \\=\Sigma_i||n_i||\cdot||X-t_i||-||n\cdot (X-t_i)|| \\=\begin{bmatrix}x\ y\ z\ 1\end{bmatrix}\begin{bmatrix}\Sigma_i(n_y^i)^2+(n_z^i)^2 & 0 & 0 & -\Sigma_i((n_y^i)^2+(n_z^i)^2)t_x^i \\0&\Sigma_i(n_x^i)^2+(n_z^i)^2&0&-\Sigma_i((n_x^i)^2+(n_z^i)^2)t_y^i \\0&0&\Sigma_i(n_x^i)^2+(n_y^i)^2&-\Sigma_i((n_x^i)^2+(n_y^i)^2)t_z^i \\ -\Sigma_i((n_y^i)^2+(n_z^i)^2)t_x^i &-\Sigma_i((n_x^i)^2+(n_z^i)^2)t_y^i &-\Sigma_i((n_x^i)^2+(n_y^i)^2)t_z^i &\Sigma_i\Sigma_x((n_y^i)^2+(n_z^i)^2)t_x^2\end{bmatrix}\begin{bmatrix}x\\y\\z\\1\end{bmatrix} Σi=03di2=Σi∣∣ni∣∣∣∣Xti∣∣∣∣n(Xti)∣∣=[x y z 1] Σi(nyi)2+(nzi)200Σi((nyi)2+(nzi)2)txi0Σi(nxi)2+(nzi)20Σi((nxi)2+(nzi)2)tyi00Σi(nxi)2+(nyi)2Σi((nxi)2+(nyi)2)tziΣi((nyi)2+(nzi)2)txiΣi((nxi)2+(nzi)2)tyiΣi((nxi)2+(nyi)2)tziΣiΣx((nyi)2+(nzi)2)tx2 xyz1

你可能感兴趣的:(矩阵,线性代数,算法)