aboutsummaryrefslogblamecommitdiffstats
path: root/meowpp.test/src/autostitch_K_Match.cpp
blob: 6e5c69f765f5004b3f3c57a69a75a8c8308e1386 (plain) (tree)



















                                                  
                           






                                                  
                                                             






                                                                       
#include "autostitch.h"

#include "meowpp/utility.h"

#include "meowpp/gra/FeaturePointsMatch_K_Match.h"

#include "meowpp/Usage.h"

using namespace meow;

MyK_Match::MyK_Match(){
}


MyK_Match::~MyK_Match(){
}


Usage MyK_Match::usage() const{
  Usage usg;
  usg.optionAdd("kmatch-k",
                "k nearest neighbors",
                "<number>", stringPrintf("%d", 5),
                false);
  return usg;
}

bool MyK_Match::usage(meow::Usage const& usg){
  _body.paramK(atoi(usg.optionValue("kmatch-k", 0).c_str()));
  return true;
}

FeaturePointIndexPairs MyK_Match::match(
  std::vector<std::vector<FeaturePoint<double, double> > > const& fp) {
  return _body.match(fp[0][0].description().dimension(), fp);
}