make_test_tree.cpp
Go to the documentation of this file.
00001 #include "vocabulary_tree/mutable_tree.h"
00002 
00003 int main(int argc, char** argv)
00004 {
00005   typedef Eigen::Vector4f Feature;
00006 
00007   vt::MutableVocabularyTree<Feature> vtree;
00008   vtree.setSize(2, 2);
00009   // Level 1
00010   vtree.centers().push_back(Feature(-5.0f, -5.0f, -5.0f, -5.0f));
00011   vtree.centers().push_back(Feature(5.0f, 5.0f, 5.0f, 5.0f));
00012   // Level 2
00013   vtree.centers().push_back(Feature(-4.0f, -4.0f, -4.0f, -4.0f));
00014   vtree.centers().push_back(Feature(-6.0f, -6.0f, -6.0f, -6.0f));
00015   vtree.centers().push_back(Feature(4.0f, 4.0f, 4.0f, 4.0f));
00016   vtree.centers().push_back(Feature(6.0f, 6.0f, 6.0f, 6.0f));
00017 
00018   // All nodes are valid
00019   vtree.validCenters().resize(6, 1);
00020   
00021   vtree.save("test.tree");
00022 
00023   return 0;
00024 }


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