Matcher.cpp
Go to the documentation of this file.
00001 #include "../utest.h"
00002 
00003 using namespace std;
00004 using namespace PointMatcherSupport;
00005 
00006 //---------------------------
00007 // Matcher modules
00008 //---------------------------
00009 
00010 // Utility classes
00011 class MatcherTest: public IcpHelper
00012 {
00013 
00014 public:
00015 
00016         PM::Matcher* testedMatcher;
00017 
00018         // Will be called for every tests
00019         virtual void SetUp()
00020         {
00021                 icp.setDefault();
00022                 // Uncomment for consol outputs
00023                 //setLogger(PM::get().LoggerRegistrar.create("FileLogger"));
00024         }
00025 
00026         // Will be called for every tests
00027         virtual void TearDown(){}
00028 
00029         void addFilter(string name, PM::Parameters params)
00030         {
00031                 testedMatcher = 
00032                         PM::get().MatcherRegistrar.create(name, params);
00033                 icp.matcher.reset(testedMatcher);
00034         }
00035 
00036 };
00037 
00038 TEST_F(MatcherTest, KDTreeMatcher)
00039 {
00040         vector<unsigned> knn = list_of (1) (2) (3);
00041         vector<double> epsilon = list_of (0.0) (0.2);
00042         vector<double> maxDist = list_of (1.0) (0.5);
00043 
00044         for(unsigned i=0; i < knn.size(); i++)
00045         {
00046                 for(unsigned j=0; j < epsilon.size(); j++)
00047                 {
00048                         for(unsigned k=0; k < maxDist.size(); k++)
00049                         {
00050                                 params = PM::Parameters();
00051                                 params["knn"] = toParam(knn[i]); // remove end parenthesis for bug
00052                                 params["epsilon"] = toParam(epsilon[j]);
00053                                 params["searchType"] = "1";
00054                                 params["maxDist"] = toParam(maxDist[k]);
00055                                 
00056                         
00057                                 addFilter("KDTreeMatcher", params);
00058                                 validate2dTransformation();
00059                                 validate3dTransformation();
00060                         }
00061                 }
00062         }
00063 }


libpointmatcher
Author(s):
autogenerated on Mon Sep 14 2015 02:59:06