script6

test Bouguet calibration routines

Contents

clear
close all
load Calib_Results
ima_numbers = 1:4;
load_images;
dont_ask = 1; % suppress queries

calibration results

show_calib_results;

Calibration results (with uncertainties):

Focal Length:          fc = [ 5983.36269   5901.31652 ] ± [ 177.20378   164.99192 ]
Principal point:       cc = [ 3062.40267   874.70833 ] ± [ 287.08660   179.29381 ]
Skew:             alpha_c = [ 0.00000 ] ± [ 0.00000  ]   => angle of pixel axes = 90.00000 ± 0.00000 degrees
Distortion:            kc = [ -0.31183   0.82956   -0.00141   0.01528  0.00000 ] ± [ 0.09733   0.64439   0.00625   0.01040  0.00000 ]
Pixel error:          err = [ 3.60275   2.10215 ]

Note: The numerical errors are approximately three times the standard deviations (for reference).


reproject_calib

reproject_calib;
Pixel error: [1.95365   3.28618] (Image 1)
Pixel error: [1.32083   1.56940] (Image 2)
Pixel error: [5.68218   1.66049] (Image 3)
Pixel error: [3.83260   1.36648] (Image 4)
Warning: Image is too big to fit on screen; displaying at 25% 
Warning: Image is too big to fit on screen; displaying at 25% 
Warning: Image is too big to fit on screen; displaying at 25% 
Warning: Image is too big to fit on screen; displaying at 25% 
Pixel error:      err = [3.60275   2.10215] (all active images)

close all
% X,om,T,f,c,k,alpha
kk = 2;
cs = num2str(kk);
eval(['X = X_' cs ';']);
eval(['om = omc_' cs ';']);
eval(['T = Tc_' cs ';']);
eval(['y_kk = y_' cs ';']);
project_points_small;
% max(abs(xp-y_kk)')
maximum diff from Bouguet: 0 0
filename = [calib_name num2str(kk) '.jpg'];
rgb = imread(filename);
imshow(rgb);
hold on
delta = 20;
xd = x_2;
plot(xp(1,:),xp(2,:),'yo','LineWidth',2);
plot(xd(1,:),xd(2,:),'m+','LineWidth',2);
plot(cc(1),cc(2),'bx','MarkerSize',11,'LineWidth',2);
text(cc(1)+delta,cc(2)+delta,'CC');
hold off
Warning: Image is too big to fit on screen; displaying at 25%