aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp.test/src/match_MatchAll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'meowpp.test/src/match_MatchAll.cpp')
-rw-r--r--meowpp.test/src/match_MatchAll.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/meowpp.test/src/match_MatchAll.cpp b/meowpp.test/src/match_MatchAll.cpp
deleted file mode 100644
index 062c1e5..0000000
--- a/meowpp.test/src/match_MatchAll.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include "match.h"
-
-#include "meowpp/gra/FeaturePointsMatch_K_Match.h"
-#include "meowpp/Usage.h"
-#include "meowpp/oo/ObjSelector.h"
-
-#include <string>
-#include <vector>
-
-using namespace meow;
-using namespace std;
-
-
-class MatchAll_K_Match: public MatchAll {
-private:
- FeaturePointsMatch_K_Match<double, double, FeaturePoint<double, double, Vector2D<double> > > match_;
-public:
- vector<PairToPair<size_t> > match(std::vector<std::vector<FP> > const& fpss) const {
- int des = 0;
- bool ok = false;
- for (size_t i = 0; !ok && i < fpss.size(); ++i)
- for (size_t j = 0; !ok && j < fpss[i].size(); ++j) {
- des = fpss[0][0].description().dimension();
- ok = true;
- }
- /*
- vector<PairToPair<size_t> > normal = match_.match(des, fpss);
- ((MatchAll_K_Match*)this)->match_.paramK(match_.paramK() * 2);
- vector<PairToPair<size_t> > large = match_.match(des, fpss);
- for (size_t i = 0, I = normal.size(); i < I; ++i) {
- bool found = false;
- for (size_t j = 0, J = large.size(); j < J && !found; ++j) {
- if (normal[i] == large[j]) {
- found = true;
- }
- }
- if (!found) {
- printf("!!!!!!!!!!!!\n");
- }
- }
- // */
- return match_.match(des, fpss);
- }
- string description() const {
- return string("k nearest match");
- }
- Usage usage() const {
- Usage tmp;
- tmp.optionAdd("kmatch-k",
- "...",
- "number",
- stringPrintf("%d", match_.paramK()),
- false);
- return tmp;
- }
- bool usage(Usage const& usg) {
- int k = atoi(usg.optionValue("kmatch-k", 0).c_str());
- match_.paramK(k);
- return true;
- }
- ObjBase* create() const {
- return new MatchAll_K_Match;
- }
-};
-
-static ObjSelector<kMatchAll_ID> __("kmatch", new MatchAll_K_Match, true);