aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp.test/src/autostitch_K_Match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'meowpp.test/src/autostitch_K_Match.cpp')
-rw-r--r--meowpp.test/src/autostitch_K_Match.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/meowpp.test/src/autostitch_K_Match.cpp b/meowpp.test/src/autostitch_K_Match.cpp
new file mode 100644
index 0000000..d2fe8c6
--- /dev/null
+++ b/meowpp.test/src/autostitch_K_Match.cpp
@@ -0,0 +1,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);
+}