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
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
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
00019 vtree.validCenters().resize(6, 1);
00020
00021 vtree.save("test.tree");
00022
00023 return 0;
00024 }