MatchHelper.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  MatchHelper.cpp
00003  *
00004  *  (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *******************************************************************************/
00007 
00008 #include "MatchHelper.h"
00009 
00010 #include "Workers/Math/Math.h"
00011 
00012 #define THIS MatchHelper
00013 
00014 THIS::THIS()
00015 {
00016 }
00017 
00018 THIS::~THIS()
00019 {
00020 }
00021 
00022 void THIS::calcScaleQuotients( std::vector< KeyPoint >* keyPoints1, std::vector< KeyPoint >* keyPoints2, std::list< KeyPointMatch >& matches )
00023 {
00024   std::list< KeyPointMatch >::iterator currentMatch = matches.begin();
00025   while ( currentMatch != matches.end() )
00026   {
00027     unsigned index1 = currentMatch->index1;
00028     unsigned index2 = currentMatch->index2;
00029     currentMatch->scaleQuotient = (*keyPoints1)[ index1 ].scale/ (*keyPoints2)[ index2 ].scale;
00030     currentMatch++;
00031   }
00032 }
00033 
00034 
00035 void THIS::calcTurnAngles( std::vector< KeyPoint >* keyPoints1, std::vector< KeyPoint >* keyPoints2, std::list< KeyPointMatch >& matches )
00036 {
00037   std::list< KeyPointMatch >::iterator currentMatch = matches.begin();
00038   while ( currentMatch != matches.end() )
00039   {
00040     unsigned index1 = currentMatch->index1;
00041     unsigned index2 = currentMatch->index2;
00042     currentMatch->turnAngle = Math::minTurnAngle ( (*keyPoints1)[ index1 ].orientation, (*keyPoints2)[ index2 ].orientation );
00043     currentMatch++;
00044   }
00045 }
00046 
00047 #undef THIS


or_libs
Author(s): raphael
autogenerated on Mon Oct 6 2014 02:53:18