


LASER_ONTO_IMAGE_CB is the callback file for Laser onto image feature. LASER_ONTO_IMAGE_CB is called to reproject laser points from a laser range finder onto an image. This can be useful for the verification of the calibration results. Calib_Results.mat file needs to present in order to retrieve the camera calibration parameters.


0001 % LASER_ONTO_IMAGE_CB is the callback file for Laser onto image feature. 0002 % 0003 % LASER_ONTO_IMAGE_CB is called to reproject laser points from a laser 0004 % range finder onto an image. This can be useful for the verification of 0005 % the calibration results. 0006 % 0007 % Calib_Results.mat file needs to present in order to retrieve the camera 0008 % calibration parameters. 0009 0010 if ~exist('delta','var') 0011 disp('No Calibration Data.'); 0012 return; 0013 end 0014 if ~exist('.\Calib_Results.mat','file') 0015 disp('Calib_Results.mat is needed to proceed.'); 0016 return; 0017 end 0018 0019 % load camera calibration results. 0020 load Calib_Results.mat fc cc kc alpha_c fc_error cc_error kc_error alpha_c_error; 0021 0022 % adjust errors, divide by 3 to get standard deviation (the camera 0023 % calibraiton toolbox outputs 3 times the standard deviation as an 0024 % uncertainty). 0025 fc_error=fc_error./3; 0026 cc_error=cc_error./3; 0027 kc_error=kc_error./3; 0028 alpha_c_error=alpha_c_error./3; 0029 0030 % select images 0031 loino=input('Select image numbers to display ([]=none):'); 0032 0033 % display all images 0034 for cntr=loino 0035 im=GetImage(cntr); 0036 if isempty(im) 0037 disp('File does not exist.'); 0038 return; 0039 else 0040 InsertLaserIntoImage( GetImage(cntr), angleVector, rangeMatrix(cntr,:), delta, phi, fc, cc, kc, alpha_c,deltae,rote,fc_error,cc_error,kc_error,alpha_c_error); 0041 end 0042 end