Rev | Line | |
---|
[926] | 1 | %%%%%%%%%%%%%%%%%%%% RECOMPUTES THE REPROJECTION ERROR %%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 2 | |
---|
| 3 | check_active_images; |
---|
| 4 | |
---|
| 5 | % Reproject the patterns on the images, and compute the pixel errors: |
---|
| 6 | |
---|
| 7 | ex = []; % Global error vector |
---|
| 8 | x = []; % Detected corners on the image plane |
---|
| 9 | y = []; % Reprojected points |
---|
| 10 | |
---|
| 11 | if ~exist('alpha_c'), |
---|
| 12 | alpha_c = 0; |
---|
| 13 | end; |
---|
| 14 | |
---|
| 15 | for 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 | |
---|
| 44 | end; |
---|
| 45 | |
---|
| 46 | err_std = std(ex')'; |
---|
Note: See
TracBrowser
for help on using the repository browser.