diff --git a/mr/Ub5/TOOLBOX_calib/Calib_Results.mat b/mr/Ub5/TOOLBOX_calib/Calib_Results.mat new file mode 100644 index 0000000..556d52f --- /dev/null +++ b/mr/Ub5/TOOLBOX_calib/Calib_Results.mat Binary files differ diff --git a/mr/Ub5/TOOLBOX_calib/test.jpg b/mr/Ub5/TOOLBOX_calib/test.jpg new file mode 100644 index 0000000..d1455d8 --- /dev/null +++ b/mr/Ub5/TOOLBOX_calib/test.jpg Binary files differ diff --git a/mr/Ub5/UB5.pdf b/mr/Ub5/UB5.pdf index 2401275..6132b54 100644 --- a/mr/Ub5/UB5.pdf +++ b/mr/Ub5/UB5.pdf Binary files differ diff --git a/mr/Ub5/UB5.tex b/mr/Ub5/UB5.tex index afe7d7f..4866f3c 100644 --- a/mr/Ub5/UB5.tex +++ b/mr/Ub5/UB5.tex @@ -87,18 +87,51 @@ \begin{itemize} \item Resolution: 656x494 \item Framerate: 73fps - \item $73\frac{1}{s}\cdot 656\cdot 494\cdot 1$ Byte$=23656672\frac{\text{Byte}}{s}$ + \item $73\frac{1}{s}\cdot 656\cdot 494\cdot 1$ Byte$=23656672\frac{\text{Byte}}{s} =22,561\frac{\text{MB}}{s} $ \end{itemize} - \item We'd expect the principle point to be at (0,0) if this correspondents to the middle of the picture. So it should be in Pixel 162032. + \item We'd expect the principle point to be at (0,0) if this correspondents to the middle of the picture. So it should be in Pixel 162032. (Position (353;247)) \item after optimization: \begin{itemize} - \item focal length: 780.37666, 776.84481 - \item Principle point: 304.55702, 336.54883 - \item distortion: -0.19833, 0.30243, 0.01975, -0.00276, 0.00000 - \item Pixel error: 0.95118, 0.87892 + \item focal length: [ 764.08776 , 765.38354 ] \\Variance [ 23.27887 , 25.40916 ] + \item Principle point: [ 361.64057 , 143.47510 ] \\Variance [ 34.24946 , 40.45983 ] + \item distortion: [ -0.05504 , -0.17691 , -0.01918 , 0.00475 , 0.00000 ] \\Variance [ 0.07945 0.20352 , 0.01081 , 0.00827 , 0.00000 ] + \item Pixel error:[ 0.79394, 0.91111 ] + + \item + picture width in x direction: 22.58 cm \\ + $\alpha= \frac{640}{225.8mm}=2.8346\frac{p}{mm}\\ + k_u = k_v = l\cdot \alpha = 764.08776mm\cdot2.8346\frac{p}{mm} = 2165.883p$\\ + calibration matrix:$ \\ + \begin{pmatrix} + k_u& 0& u_0\\0& k_v& v_0\\ 0&0&1 + \end{pmatrix} = \begin{pmatrix} + 2165.883& 0& 361.64057\\0& 2165.883& 143.47510\\ 0&0&1 + \end{pmatrix}$\\ \item The pixel error ist the standard deviation of the reprojection error in x- and y-Direction \end{itemize} - %TODO + \item Expectation: (353,247)\\ + Found: (361.64057 , 143.47510)\\ + \\The prinicpal point depends on how the lens is mounted over the sensor. In respect to the given sensor it is mounted on the center right. + \item we supressed image 11,13,14,15 due to their reprojection errors' big variances.\\ + Old Pixel error:[ 0.79394, 0.91111 ]\\ + New Pixel Error:[ 0.39567, 0.30326 ]\\ + $\Delta Error$ [0.39827, 0.60785] \\ + \item + Distance: 2313.405920 + \\Translation Vector: $ + \begin{pmatrix} + 552.389076 \\ -177.507678 \\ 2313.405920 + \end{pmatrix} + $\\ + Rotation Matrix: $ + \begin{pmatrix} + 0.998247 & 0.004348 & -0.059025 \\ + 0.011771 &-0.991961 & 0.125999 \\ + -0.058003 & -0.126473& -0.990273 \\ + \end{pmatrix} + $ + + \end{enumerate} \Aufgabe{}{10} \begin{enumerate}[(a)] @@ -112,14 +145,28 @@ \end{pmatrix},\ n_b\approx\begin{pmatrix} 0.245\\0.258\\1 \end{pmatrix}$ + + + + \item $\alpha =\tan^{-1}\left(d(n_c,n_b)\right)\approx\tan^{-1}\left(\sqrt{\left(0.236-0.245\right)^2+\left(0.255-0.258\right)^2}\right)\approx 0.00980$ \item $Z_C=\frac{20mm }{d(n_c,n_b)}=\frac{20mm}{ \sqrt{\left(0.236-0.245\right)^2+\left(0.255-0.258\right)^2}}\approx \frac{20mm}{0.00949}\approx 2107mm$ + \begin{figure}[!htb] + + \centering + \includegraphics[width=0.6\textwidth]{Z.png} + \caption{\label{fig:z} How to calculate Z} + + \end{figure} + see figure \ref{fig:z} \item $Z_C\cdot n=N\Rightarrow P_C=\begin{pmatrix} Z_C\cdot 0.236\\Z_C\cdot 0.255\\ Z_C \end{pmatrix}\approx \begin{pmatrix} 497.2\\537.3\\ 2107 \end{pmatrix}mm$ - \item Depending on how many distortion parameters we want to know, the system of linear equations may be of high dimension. In addition we can't sepeate by coordinate because the solutions for $x$ and $y$ depend on each other. Even for only computing radial distortion only up to the second degree we have to\\ + + + \item Depending on how many distortion parameters we want to know, the system of linear equations may be of high dimension. In addition we can't seperate by coordinates because the solutions for $x$ and $y$ depend on each other. Even for only computing radial distortion only up to the second degree we have to\\ solve $\begin{pmatrix} x_d\\y_d \end{pmatrix}=\begin{pmatrix} @@ -130,5 +177,7 @@ x\\y \end{pmatrix}\right|\right|_2^4$ for $x$ and $y$. \end{enumerate} + + \end{document} diff --git a/mr/Ub5/Z.png b/mr/Ub5/Z.png new file mode 100644 index 0000000..4e388e5 --- /dev/null +++ b/mr/Ub5/Z.png Binary files differ diff --git a/mr/Ub5/calib_images/calib_data.mat b/mr/Ub5/calib_images/calib_data.mat index cbc0a8e..69ae0b2 100644 --- a/mr/Ub5/calib_images/calib_data.mat +++ b/mr/Ub5/calib_images/calib_data.mat Binary files differ diff --git a/mr/Ub5/calib_images/results.m b/mr/Ub5/calib_images/results.m index b4e5878..aac1725 100644 --- a/mr/Ub5/calib_images/results.m +++ b/mr/Ub5/calib_images/results.m @@ -27,3 +27,52 @@ Pixel error: err = [ 1.33896 1.25581 ] Note: The numerical errors are approximately three times the standard deviations (for reference). + + +Extrinsic parameters: + +Number of squares along the X direction ([]=10) = 8 +Number of squares along the Y direction ([]=10) = 7 +Size dX of each square along the X direction ([]=30mm) = 54 +Size dY of each square along the Y direction ([]=30mm) = 54 + +Translation vector: Tc_ext = [ -295.157345 -340.694769 2507.099269 ] +Rotation vector: omc_ext = [ -2.085621 -2.117698 -0.327370 ] +Rotation matrix: Rc_ext = [ -0.021195 0.998759 0.045077 + 0.965749 0.008790 0.259330 + 0.258612 0.049029 -0.964736 ] +Pixel error: err = [ 1.84321 1.20288 ] + + +------------------------------------------------ 5*6 felder + +Calibration parameters after initialization: + +Focal Length: fc = [ 710.77236 710.77236 ] +Principal point: cc = [ 319.50000 239.50000 ] +Skew: alpha_c = [ 0.00000 ] => angle of pixel = 90.00000 degrees +Distortion: kc = [ 0.00000 0.00000 0.00000 0.00000 0.00000 ] + +after optimization + +Focal Length: fc = [ 764.08776 765.38354 ] ? [ 23.27887 25.40916 ] +Principal point: cc = [ 361.64057 143.47510 ] ? [ 34.24946 40.45983 ] +Skew: alpha_c = [ 0.00000 ] ? [ 0.00000 ] => angle of pixel axes = 90.00000 ? 0.00000 degrees +Distortion: kc = [ -0.05504 -0.17691 -0.01918 0.00475 0.00000 ] ? [ 0.07945 0.20352 0.01081 0.00827 0.00000 ] +Pixel error: err = [ 0.79394 0.91111 ] + Remove 11,13,14,15 +Focal Length: fc = [ 732.31403 733.41176 ] ? [ 10.09156 10.61468 ] +Principal point: cc = [ 324.85841 209.60338 ] ? [ 20.79389 22.07956 ] +Skew: alpha_c = [ 0.00000 ] ? [ 0.00000 ] => angle of pixel axes = 90.00000 ? 0.00000 degrees +Distortion: kc = [ -0.12060 -0.17602 -0.00811 0.00175 0.00000 ] ? [ 0.04433 0.15173 0.00345 0.00525 0.00000 ] +Pixel error: err = [ 0.39567 0.30326 ] + +extrisic +Extrinsic parameters of test: + +Translation vector: Tc_ext = [ 552.389076 -177.507678 2313.405920 ] +Rotation vector: omc_ext = [ -3.013636 -0.012204 0.088603 ] +Rotation matrix: Rc_ext = [ 0.998247 0.004348 -0.059025 + 0.011771 -0.991961 0.125999 + -0.058003 -0.126473 -0.990273 ] +Pixel error: err = [ 0.20394 0.13048 ] \ No newline at end of file