% Intrinsic and Extrinsic Camera Parameters
%
% This script file can be directly excecuted under Matlab to recover the camera intrinsic and extrinsic parameters.
% IMPORTANT: This file contains neither the structure of the calibration objects nor the image coordinates of the calibration points.
%            All those complementary variables are saved in the complete matlab data file Calib_Results.mat.
% For more information regarding the calibration model visit http://www.vision.caltech.edu/bouguetj/calib_doc/


%-- Focal length:
fc = [ 193.797763771536070 ; 191.813011216908250 ];

%-- Principal point:
cc = [ 158.295772967795530 ; 113.158427964850380 ];

%-- Skew coefficient:
alpha_c = 0.000000000000000;

%-- Distortion coefficients:
kc = [ -0.240165751066961 ; 0.017270283961776 ; 0.008286445015091 ; -0.003829794301381 ; 0.000000000000000 ];

%-- Focal length uncertainty:
fc_error = [ 18.049100234396374 ; 16.935172886994046 ];

%-- Principal point uncertainty:
cc_error = [ 6.247917709879527 ; 7.970465852135222 ];

%-- Skew coefficient uncertainty:
alpha_c_error = 0.000000000000000;

%-- Distortion coefficients uncertainty:
kc_error = [ 0.049883621201481 ; 0.028705249531958 ; 0.008785241819949 ; 0.005163355337567 ; 0.000000000000000 ];

%-- Image size:
nx = 320;
ny = 240;


%-- Various other variables (may be ignored if you do not use the Matlab Calibration Toolbox):
%-- Those variables are used to control which intrinsic parameters should be optimized

n_ima = 23;						% Number of calibration images
est_fc = [ 1 ; 1 ];					% Estimation indicator of the two focal variables
est_aspect_ratio = 1;				% Estimation indicator of the aspect ratio fc(2)/fc(1)
center_optim = 1;					% Estimation indicator of the principal point
est_alpha = 0;						% Estimation indicator of the skew coefficient
est_dist = [ 1 ; 1 ; 1 ; 1 ; 0 ];	% Estimation indicator of the distortion coefficients


%-- Extrinsic parameters:
%-- The rotation (omc_kk) and the translation (Tc_kk) vectors for every calibration image and their uncertainties

%-- Image #1:
omc_1 = [ 2.225024e+000 ; 2.198483e+000 ; -2.911773e-001 ];
Tc_1  = [ -3.230995e+002 ; -1.481972e+002 ; 1.134044e+003 ];
omc_error_1 = [ 5.143297e-002 ; 4.583393e-002 ; 1.058288e-001 ];
Tc_error_1  = [ 3.610780e+001 ; 4.682817e+001 ; 1.093002e+002 ];

%-- Image #2:
omc_2 = [ 2.235363e+000 ; 2.143051e+000 ; -3.024310e-001 ];
Tc_2  = [ -3.212281e+002 ; -1.589012e+002 ; 1.144379e+003 ];
omc_error_2 = [ 5.151855e-002 ; 4.571255e-002 ; 1.055723e-001 ];
Tc_error_2  = [ 3.644010e+001 ; 4.716366e+001 ; 1.100572e+002 ];

%-- Image #3:
omc_3 = [ 1.997851e+000 ; 1.996369e+000 ; -3.964388e-001 ];
Tc_3  = [ -1.563878e+002 ; -1.454711e+001 ; 1.067351e+003 ];
omc_error_3 = [ 4.868102e-002 ; 3.956453e-002 ; 7.912272e-002 ];
Tc_error_3  = [ 3.344385e+001 ; 4.457086e+001 ; 9.568425e+001 ];

%-- Image #4:
omc_4 = [ 2.141336e+000 ; 2.089289e+000 ; 1.505327e-001 ];
Tc_4  = [ -4.553803e+002 ; -3.809917e+002 ; 9.085031e+002 ];
omc_error_4 = [ 3.890363e-002 ; 4.637765e-002 ; 8.718123e-002 ];
Tc_error_4  = [ 3.172832e+001 ; 3.880764e+001 ; 8.651729e+001 ];

%-- Image #5:
omc_5 = [ 2.186667e+000 ; 2.077449e+000 ; -2.730101e-002 ];
Tc_5  = [ -4.410801e+002 ; -1.843257e+002 ; 9.244613e+002 ];
omc_error_5 = [ 4.078869e-002 ; 4.094527e-002 ; 8.264218e-002 ];
Tc_error_5  = [ 3.058853e+001 ; 3.867269e+001 ; 8.880400e+001 ];

%-- Image #6:
omc_6 = [ 2.113535e+000 ; 2.249371e+000 ; -1.336611e-001 ];
Tc_6  = [ -2.431166e+002 ; -2.253294e+002 ; 9.673357e+002 ];
omc_error_6 = [ 4.188082e-002 ; 3.979687e-002 ; 8.418976e-002 ];
Tc_error_6  = [ 3.121954e+001 ; 3.984915e+001 ; 9.253847e+001 ];

%-- Image #7:
omc_7 = [ -1.824369e+000 ; -2.468402e+000 ; 2.176954e-001 ];
Tc_7  = [ -1.538195e+002 ; -2.209325e+002 ; 1.540524e+003 ];
omc_error_7 = [ 6.583519e-002 ; 1.063537e-001 ; 1.828331e-001 ];
Tc_error_7  = [ 4.980326e+001 ; 6.376530e+001 ; 1.533187e+002 ];

%-- Image #8:
omc_8 = [ -1.822798e+000 ; -2.469792e+000 ; 2.790458e-001 ];
Tc_8  = [ -8.837437e+001 ; -3.384869e+002 ; 1.685146e+003 ];
omc_error_8 = [ 7.520714e-002 ; 1.113918e-001 ; 2.001873e-001 ];
Tc_error_8  = [ 5.484399e+001 ; 6.910670e+001 ; 1.646358e+002 ];

%-- Image #9:
omc_9 = [ -1.974833e+000 ; -2.233662e+000 ; -8.860087e-003 ];
Tc_9  = [ -4.345109e+001 ; -7.146582e+002 ; 1.481509e+003 ];
omc_error_9 = [ 8.806858e-002 ; 9.186877e-002 ; 1.672320e-001 ];
Tc_error_9  = [ 5.011587e+001 ; 6.384247e+001 ; 1.415762e+002 ];

%-- Image #10:
omc_10 = [ 1.768247e+000 ; 2.308331e+000 ; -7.148157e-001 ];
Tc_10  = [ 1.100405e+002 ; -1.693567e+002 ; 1.082664e+003 ];
omc_error_10 = [ 4.241781e-002 ; 4.113813e-002 ; 8.235611e-002 ];
Tc_error_10  = [ 3.444870e+001 ; 4.495040e+001 ; 9.150294e+001 ];

%-- Image #11:
omc_11 = [ -2.166738e+000 ; -2.000374e+000 ; 7.004992e-001 ];
Tc_11  = [ -5.558975e+001 ; -1.487968e+002 ; 1.019637e+003 ];
omc_error_11 = [ 3.587603e-002 ; 3.860528e-002 ; 9.510558e-002 ];
Tc_error_11  = [ 3.397648e+001 ; 4.122924e+001 ; 8.787461e+001 ];

%-- Image #12:
omc_12 = [ 2.280292e+000 ; 1.967050e+000 ; -1.216296e-001 ];
Tc_12  = [ -5.634567e+002 ; -1.002271e+002 ; 9.781274e+002 ];
omc_error_12 = [ 4.398950e-002 ; 4.316247e-002 ; 8.777408e-002 ];
Tc_error_12  = [ 3.167136e+001 ; 4.125948e+001 ; 9.532841e+001 ];

%-- Image #13:
omc_13 = [ -2.156378e+000 ; -2.067277e+000 ; 6.391329e-001 ];
Tc_13  = [ -3.260541e+002 ; -1.780295e+002 ; 9.893527e+002 ];
omc_error_13 = [ 3.113142e-002 ; 2.993750e-002 ; 7.982378e-002 ];
Tc_error_13  = [ 3.239695e+001 ; 4.034913e+001 ; 8.688110e+001 ];

%-- Image #14:
omc_14 = [ 2.153514e+000 ; 2.054249e+000 ; 7.425345e-002 ];
Tc_14  = [ -2.753270e+002 ; -1.936338e+002 ; 7.189437e+002 ];
omc_error_14 = [ 3.350742e-002 ; 2.765994e-002 ; 5.856249e-002 ];
Tc_error_14  = [ 2.433226e+001 ; 3.002008e+001 ; 6.780704e+001 ];

%-- Image #15:
omc_15 = [ 2.195621e+000 ; 2.039133e+000 ; 7.202875e-004 ];
Tc_15  = [ -3.154881e+002 ; -1.987719e+002 ; 7.847520e+002 ];
omc_error_15 = [ 3.456318e-002 ; 3.029095e-002 ; 6.375137e-002 ];
Tc_error_15  = [ 2.613488e+001 ; 3.259426e+001 ; 7.430148e+001 ];

%-- Image #16:
omc_16 = [ 2.488261e+000 ; 1.658640e+000 ; -3.863579e-001 ];
Tc_16  = [ -4.665362e+002 ; -1.424856e+002 ; 1.007658e+003 ];
omc_error_16 = [ 3.669687e-002 ; 3.202324e-002 ; 7.761164e-002 ];
Tc_error_16  = [ 3.229044e+001 ; 4.168106e+001 ; 9.574019e+001 ];

%-- Image #17:
omc_17 = [ -2.272784e+000 ; -2.046657e+000 ; 3.507016e-001 ];
Tc_17  = [ -3.733687e+002 ; -2.065956e+002 ; 6.780937e+002 ];
omc_error_17 = [ 2.496190e-002 ; 2.255728e-002 ; 5.871846e-002 ];
Tc_error_17  = [ 2.173918e+001 ; 2.741310e+001 ; 6.439251e+001 ];

%-- Image #18:
omc_18 = [ -2.238110e+000 ; -2.051270e+000 ; 5.935374e-001 ];
Tc_18  = [ -2.307890e+002 ; -1.588101e+002 ; 9.933525e+002 ];
omc_error_18 = [ 3.263562e-002 ; 3.261120e-002 ; 8.638573e-002 ];
Tc_error_18  = [ 3.228518e+001 ; 4.040614e+001 ; 8.936641e+001 ];

%-- Image #19:
omc_19 = [ 2.092885e+000 ; 1.909045e+000 ; 2.891234e-001 ];
Tc_19  = [ -3.763556e+001 ; -1.349088e+002 ; 7.728773e+002 ];
omc_error_19 = [ 4.094287e-002 ; 2.483585e-002 ; 5.672424e-002 ];
Tc_error_19  = [ 2.624158e+001 ; 3.220574e+001 ; 7.623933e+001 ];

%-- Image #20:
omc_20 = [ -2.224032e+000 ; -2.134681e+000 ; 4.445881e-001 ];
Tc_20  = [ -3.524043e+002 ; -2.542034e+002 ; 6.797708e+002 ];
omc_error_20 = [ 2.544728e-002 ; 2.159877e-002 ; 6.256263e-002 ];
Tc_error_20  = [ 2.198318e+001 ; 2.730641e+001 ; 6.402380e+001 ];

%-- Image #21:
omc_21 = [ 2.239892e+000 ; 2.200819e+000 ; -1.322925e-001 ];
Tc_21  = [ -2.685047e+002 ; -1.796447e+002 ; 9.218538e+002 ];
omc_error_21 = [ 4.059371e-002 ; 3.468659e-002 ; 8.170196e-002 ];
Tc_error_21  = [ 2.968937e+001 ; 3.822336e+001 ; 8.831748e+001 ];

%-- Image #22:
omc_22 = [ 2.375658e+000 ; 1.968609e+000 ; -6.957020e-001 ];
Tc_22  = [ -4.692715e+002 ; -1.972999e+002 ; 9.756219e+002 ];
omc_error_22 = [ 2.564432e-002 ; 3.236189e-002 ; 8.008078e-002 ];
Tc_error_22  = [ 3.247309e+001 ; 4.043157e+001 ; 8.594549e+001 ];

%-- Image #23:
omc_23 = [ 2.213002e+000 ; 2.019140e+000 ; 8.614641e-002 ];
Tc_23  = [ -2.577002e+002 ; -1.830848e+002 ; 5.382962e+002 ];
omc_error_23 = [ 2.942152e-002 ; 2.144846e-002 ; 4.864426e-002 ];
Tc_error_23  = [ 1.850419e+001 ; 2.259111e+001 ; 5.043870e+001 ];

