calibrate_cb

PURPOSE ^

CALIBRATE_CB is the calibration callback file.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 CALIBRATE_CB is the calibration callback file.

 CALIBRATE_CB is the calibration callback file for the GUI. It calls the
 final calibration function CAMLASERCALIB.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % CALIBRATE_CB is the calibration callback file.
0002 %
0003 % CALIBRATE_CB is the calibration callback file for the GUI. It calls the
0004 % final calibration function CAMLASERCALIB.
0005 
0006 
0007 if ~exist('boardclstrs','var') || isempty(find(boardclstrs,1))
0008     disp('No Extracted Board Points.');
0009     return;
0010 end
0011 if ~exist('.\Calib_Results.mat','file')
0012     disp('Calib_Results.mat is needed to proceed.');
0013     return;
0014 end
0015 
0016 
0017 if ~exist('selectionnumbers','var')
0018     selectionnumbers=input('Enter the scan numbers to be used for calibration ([]=all):');
0019     if isempty(selectionnumbers)
0020         selectionnumbers=1:size(rangeMatrix,1);
0021     end
0022 end
0023 disp('Laser-Camera Calibration.');
0024 % adjust selection numbers
0025 selectionnumbers(boardclstrs(selectionnumbers)==0)=[];
0026 [Lpts,Nc,Lptsnos] = GetCameraLaserCalibrationData(selectionnumbers,rangeMatrix,angleVector,clstrs,boardclstrs,Nci);
0027 % disp('Running optimsations. Please wait.'); % no need, fast
0028 [delta,phi] = camlasercalib(Lpts,Nc,deltaest,phiest);
0029 rmserror=geterror(Lpts,Nc,delta,phi);
0030 [deltae,rote]=getuncert(Lpts,Lptsnos,Nc);
0031 disp('Results:');
0032 disp(['Delta:',mat2str(delta',3),'±',mat2str(deltae',3)]);
0033 disp(['Phi (in degrees):',mat2str(rad2deg(dcm2angvec(phi))',3),'±',mat2str(rad2deg(rote)',3)]);
0034 disp(['Total rms error:',num2str(rmserror,3)]);
0035 
0036 % update initial estimate
0037 deltaest=delta;
0038 phiest=phi;

Generated on Thu 08-Apr-2010 14:35:09 by m2html © 2005