script7

close all
clear
filename = '2016-02-08_1.jpg';
rgb = imread(filename);
I = rgb2gray(rgb);
sz = size(rgb);

nx = sz(2);
ny = sz(1);
cc = [nx ny]/2;
fc = [6700 6700];
alpha_c = 0;
kc = zeros(1,6);
dX = 3;
dY = 3;

if ~exist('dX','var') || ~exist('dY','var'),

    % Enter the size of each square

    dX = input(['Size dX of each square along the X direction ([]=30mm) = ']);
    dY = input(['Size dY of each square along the Y direction ([]=30mm) = ']);
    if isempty(dX), dX = 30; end;
    if isempty(dY), dY = 30; end;

end;
n_ima = 1;
do_corners = false;

if do_corners
    extrinsic_corners;
else
    load ext_data;
end
kk=1;
figure
fit_extrinsics;
close
ima_numbers = 1;
reproject_calib;
Warning: Image is too big to fit on screen; displaying at 25% 


Extrinsic parameters:

Translation vector: Tc_ext = [ -0.384353 	 5.968201 	 115.958368 ]
Rotation vector:   omc_ext = [ -1.738262 	 1.924212 	 -0.229528 ]
Rotation matrix:    Rc_ext = [ -0.029887 	 -0.872103 	 0.488409
                               -0.962517 	 0.156887 	 0.221238
                               -0.269568 	 -0.463490 	 -0.844103 ]
Pixel error:           err = [ 3.53832 	 2.49570 ]

Pixel error: [3.53832   2.49570] (Image 1)
Warning: Image is too big to fit on screen; displaying at 25% 
kk=2;
ccs = cc;
cc = cc + [500 0];
figure
fit_extrinsics;
close
ima_numbers = 2;
reproject_calib;
Warning: Image is too big to fit on screen; displaying at 25% 


Extrinsic parameters:

Translation vector: Tc_ext = [ -9.146945 	 5.945503 	 116.973794 ]
Rotation vector:   omc_ext = [ -1.698017 	 1.865969 	 -0.305539 ]
Rotation matrix:    Rc_ext = [ -0.010372 	 -0.827513 	 0.561351
                               -0.963332 	 0.158791 	 0.216282
                               -0.268113 	 -0.538524 	 -0.798816 ]
Pixel error:           err = [ 3.70966 	 1.44065 ]

Pixel error: [3.70966   1.44065] (Image 2)
Warning: Image is too big to fit on screen; displaying at 25% 
kk=3;
cc = ccs;
fcs = fc;
fc = [6100 6100];
figure
fit_extrinsics;
close
ima_numbers = 3;
reproject_calib
Warning: Image is too big to fit on screen; displaying at 25% 


Extrinsic parameters:

Translation vector: Tc_ext = [ -0.436458 	 5.960961 	 106.464568 ]
Rotation vector:   omc_ext = [ -1.733550 	 1.918136 	 -0.234936 ]
Rotation matrix:    Rc_ext = [ -0.027781 	 -0.868192 	 0.495449
                               -0.962102 	 0.157728 	 0.222446
                               -0.271272 	 -0.470493 	 -0.839671 ]
Pixel error:           err = [ 4.13885 	 1.69299 ]

Pixel error: [4.13885   1.69299] (Image 3)
Warning: Image is too big to fit on screen; displaying at 25% 
extrinsics1;
Focal lengths: 6100 6100
Principal point: 2304 1296
Image Size: 4608 x 2592
Checker size: 3
Image 1

R_kk =

   -0.0299   -0.8721    0.4884
   -0.9625    0.1569    0.2212
   -0.2696   -0.4635   -0.8441


Tc_kk =

   -0.3844
    5.9682
  115.9584

Image 2

R_kk =

   -0.0104   -0.8275    0.5614
   -0.9633    0.1588    0.2163
   -0.2681   -0.5385   -0.7988


Tc_kk =

   -9.1469
    5.9455
  116.9738

Image 3

R_kk =

   -0.0278   -0.8682    0.4954
   -0.9621    0.1577    0.2224
   -0.2713   -0.4705   -0.8397


Tc_kk =

   -0.4365
    5.9610
  106.4646