diff options
author | cathook <b01902109@csie.ntu.edu.tw> | 2014-09-24 13:37:42 +0800 |
---|---|---|
committer | cathook <b01902109@csie.ntu.edu.tw> | 2014-09-29 16:55:57 +0800 |
commit | 8b76fbb408f8eedab24195655c45c891af01eaab (patch) | |
tree | 414d7fc87885cb77e181a3ab99e334b837621036 /meowpp.test/src/match_MatchAll.cpp | |
parent | ef9af0d577c3a6b5d11fdeed7a9149d09973171b (diff) | |
download | meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.gz meow-8b76fbb408f8eedab24195655c45c891af01eaab.tar.zst meow-8b76fbb408f8eedab24195655c45c891af01eaab.zip |
Big change, detail see README.
Diffstat (limited to 'meowpp.test/src/match_MatchAll.cpp')
-rw-r--r-- | meowpp.test/src/match_MatchAll.cpp | 66 |
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); |