contrib/rpl/rgrl/rgrl_feature.cxx
Go to the documentation of this file.
00001 #include "rgrl_feature.h"
00002 //:
00003 // \file
00004 // \author Amitha Perera
00005 // \date Feb 2002
00006 
00007 #include "rgrl_transformation.h"
00008 
00009 #include <vcl_cassert.h>
00010 
00011 
00012 double
00013 rgrl_feature::
00014 geometric_error( rgrl_feature const& other ) const
00015 {
00016   return (this->location() - other.location()).pre_multiply( this->error_projector_sqrt() ).two_norm();
00017 }
00018 
00019 double 
00020 rgrl_feature::
00021 geometric_error( rgrl_transformation const& xform, rgrl_feature const& other ) const
00022 { 
00023   vnl_vector<double> mapped;
00024   return (this->location() - other.location()).pre_multiply( this->error_projector_sqrt() ).two_norm();
00025 }
00026   
00027 
00028 vnl_vector<double>
00029 rgrl_feature::
00030 signature_error_vector( rgrl_feature const& ) const
00031 {
00032   assert( ! "This rgrl_feature doesn't implement signature_error_vector()" );
00033   return vnl_vector<double>(0); // to suppress compiler warnings
00034 }
00035 
00036 
00037 unsigned
00038 rgrl_feature::signature_error_dimension( vcl_type_info const& ) const
00039 {
00040   // This rgrl_feature doesn't implement signature_error_dimension()
00041   // By default, return 0;
00042   return 0;
00043 }
00044 
00045 vnl_matrix<double> const&
00046 rgrl_feature::
00047 error_projector_sqrt() const
00048 {
00049   // by default, use error_projector
00050   return error_projector();
00051 }