aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp.test/src/autostitch_K_Match.cpp
blob: d2fe8c67ef5d3de524fb498e16e7a6311f53f8b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#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('k',
                "k nearest neighbors",
                "<number>", stringPrintf("%d", 5),
                false);
  return usg;
}

bool MyK_Match::usage(meow::Usage const& usg){
  _body.paramK(atoi(usg.optionValue('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);
}