find_word.cpp
Go to the documentation of this file.
00001 #include "vocabulary_tree/vocabulary_tree.h"
00002 #include <cstdio>
00003 #include <boost/lexical_cast.hpp>
00004 
00005 int main(int argc, char** argv)
00006 {
00007   if (argc < 7) {
00008     printf("Usage: %s A.tree x y z w\n", argv[0]);
00009     return 0;
00010   }
00011 
00012   typedef Eigen::Vector4f Feature;
00013   vt::VocabularyTree<Feature> vtree;
00014   vtree.load(argv[1]);
00015 
00016   using boost::lexical_cast;
00017   Feature f(lexical_cast<float>(argv[2]), lexical_cast<float>(argv[3]),
00018             lexical_cast<float>(argv[4]), lexical_cast<float>(argv[5]));
00019   vt::Word word = vtree.quantize(f);
00020   printf("Word = %u\n", word);
00021   
00022   return 0;
00023 }


vocabulary_tree
Author(s): Patrick Mihelich
autogenerated on Thu Jan 2 2014 12:12:26