geterror

PURPOSE ^

GETERROR returns the error of the calibration results.

SYNOPSIS ^

function [rmserror,errorvec1,errorvec2]=geterror(Lpts,Nc,delta,phi,Lptsnos)

DESCRIPTION ^

 GETERROR returns the error of the calibration results.

 GETERROR returns the error of the transformation with the data in three
 different formats.
 
 USAGE:
     rmserror=geterror(Lpts,Nc,delta,phi,Lptsnos);
 
     [rmserror,errorvec]=geterror(Lpts,Nc,delta,phi,Lptsnos);
 
     [rmserror,errorvec1,errorvec2]=geterror(Lpts,Nc,delta,phi,Lptsnos);
 
 INPUTS:
     Lpts: 3xN vector containing all the laser board points.
 
     Nc: 3xN vector containing the corresponding normal vector.
 
     delta: 3x1 translation vector output by the calibration.
 
     phi: 3x3 rotation matrix output by the calibration.
 
     Lptsnos: 3xN vector containing the scan numbers of the laser points.
 

 OUTPUTS:
     rmserror: root mean squares of errors.
 
     errorvec1: 1xN vector representing the errors for each point.
 
     errorvec2: 1xM vector representing the RMS error for each scan, where
     M is the maximum value in Lptsnos.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [rmserror,errorvec1,errorvec2]=geterror(Lpts,Nc,delta,phi,Lptsnos)
0002 % GETERROR returns the error of the calibration results.
0003 %
0004 % GETERROR returns the error of the transformation with the data in three
0005 % different formats.
0006 %
0007 % USAGE:
0008 %     rmserror=geterror(Lpts,Nc,delta,phi,Lptsnos);
0009 %
0010 %     [rmserror,errorvec]=geterror(Lpts,Nc,delta,phi,Lptsnos);
0011 %
0012 %     [rmserror,errorvec1,errorvec2]=geterror(Lpts,Nc,delta,phi,Lptsnos);
0013 %
0014 % INPUTS:
0015 %     Lpts: 3xN vector containing all the laser board points.
0016 %
0017 %     Nc: 3xN vector containing the corresponding normal vector.
0018 %
0019 %     delta: 3x1 translation vector output by the calibration.
0020 %
0021 %     phi: 3x3 rotation matrix output by the calibration.
0022 %
0023 %     Lptsnos: 3xN vector containing the scan numbers of the laser points.
0024 %
0025 %
0026 % OUTPUTS:
0027 %     rmserror: root mean squares of errors.
0028 %
0029 %     errorvec1: 1xN vector representing the errors for each point.
0030 %
0031 %     errorvec2: 1xM vector representing the RMS error for each scan, where
0032 %     M is the maximum value in Lptsnos.
0033 
0034 errorvec1=geterrorvec(Lpts,Nc,delta,phi);
0035 
0036 rmserror=sqrt(sum(errorvec1.^2)/length(errorvec1));
0037 
0038 if exist('Lptsnos','var') && ~isempty(Lptsnos)
0039     uLptsnos=unique(Lptsnos);
0040     errorvec2=zeros(size(uLptsnos));
0041     for cntr=unique(Lptsnos)
0042         errorvec2(cntr)=sqrt(sum(errorvec1(Lptsnos==cntr).^2)/nnz(Lptsnos==cntr));
0043     end
0044 end
0045

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