source: trunk/src/toolbox_calib/comp_error_calib.m @ 1063

Last change on this file since 1063 was 926, checked in by sommeria, 8 years ago

geometry cqlib updated

File size: 1.1 KB
Line 
1%%%%%%%%%%%%%%%%%%%% RECOMPUTES THE REPROJECTION ERROR %%%%%%%%%%%%%%%%%%%%%%%%
2
3check_active_images;
4
5% Reproject the patterns on the images, and compute the pixel errors:
6
7ex = []; % Global error vector
8x = []; % Detected corners on the image plane
9y = []; % Reprojected points
10
11if ~exist('alpha_c'),
12   alpha_c = 0;
13end;
14
15for kk = 1:n_ima,
16   
17   eval(['omckk = omc_' num2str(kk) ';']);
18   eval(['Tckk = Tc_' num2str(kk) ';']);   
19   
20   if active_images(kk) & (~isnan(omckk(1,1))),
21     
22      %Rkk = rodrigues(omckk);
23     
24      eval(['y_' num2str(kk) '  = project_points2(X_' num2str(kk) ',omckk,Tckk,fc,cc,kc,alpha_c);']);
25     
26      eval(['ex_' num2str(kk) ' = x_' num2str(kk) ' - y_' num2str(kk) ';']);
27     
28      eval(['x_kk = x_' num2str(kk) ';']);
29     
30      eval(['ex = [ex ex_' num2str(kk) '];']);
31      eval(['x = [x x_' num2str(kk) '];']);
32      eval(['y = [y y_' num2str(kk) '];']);
33     
34   else
35     
36      % eval(['y_' num2str(kk) '  = NaN*ones(2,1);']);
37
38   
39      % If inactivated image, the error does not make sense:
40      eval(['ex_' num2str(kk) ' = NaN*ones(2,1);']);
41     
42   end;
43   
44end;
45
46err_std = std(ex')';
Note: See TracBrowser for help on using the repository browser.