Class for building a new vocabulary by hierarchically clustering a set of training features. More...
#include <tree_builder.h>
| Public Types | |
| typedef std::vector< Feature, FeatureAllocator > | FeatureVector | 
| typedef SimpleKmeans< Feature, Distance, FeatureAllocator > | Kmeans | 
| typedef MutableVocabularyTree < Feature, Distance, FeatureAllocator > | Tree | 
| Public Member Functions | |
| void | build (const FeatureVector &training_features, uint32_t k, uint32_t levels) | 
| Build a new vocabulary tree. | |
| Kmeans & | kmeans () | 
| Get the k-means clusterer. | |
| const Kmeans & | kmeans () const | 
| Get the k-means clusterer. | |
| const Tree & | tree () const | 
| Get the built vocabulary tree. | |
| TreeBuilder (const Feature &zero=Feature(), Distance d=Distance()) | |
| Constructor. | |
| Protected Attributes | |
| Kmeans | kmeans_ | 
| Tree | tree_ | 
| Feature | zero_ | 
Class for building a new vocabulary by hierarchically clustering a set of training features.
Definition at line 17 of file tree_builder.h.
| typedef std::vector<Feature, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::FeatureVector | 
Definition at line 22 of file tree_builder.h.
| typedef SimpleKmeans<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Kmeans | 
Definition at line 21 of file tree_builder.h.
| typedef MutableVocabularyTree<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Tree | 
Definition at line 20 of file tree_builder.h.
| vt::TreeBuilder< Feature, Distance, FeatureAllocator >::TreeBuilder | ( | const Feature & | zero = Feature(), | 
| Distance | d = Distance() | ||
| ) | 
Constructor.
| zero | Object representing zero in the feature space | 
| d | Functor for calculating squared distance | 
Definition at line 59 of file tree_builder.h.
| void vt::TreeBuilder< Feature, Distance, FeatureAllocator >::build | ( | const FeatureVector & | training_features, | 
| uint32_t | k, | ||
| uint32_t | levels | ||
| ) | 
Build a new vocabulary tree.
The number of words in the resulting vocabulary is at most k ^ levels.
| training_features | The set of training features to cluster. | 
| k | The branching factor, or max children of any node. | 
| levels | The number of levels in the tree. | 
Definition at line 67 of file tree_builder.h.
| Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans | ( | ) |  [inline] | 
Get the k-means clusterer.
Definition at line 47 of file tree_builder.h.
| const Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans | ( | ) | const  [inline] | 
Get the k-means clusterer.
Definition at line 49 of file tree_builder.h.
| const Tree& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree | ( | ) | const  [inline] | 
Get the built vocabulary tree.
Definition at line 44 of file tree_builder.h.
| Kmeans vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans_  [protected] | 
Definition at line 53 of file tree_builder.h.
| Tree vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree_  [protected] | 
Definition at line 52 of file tree_builder.h.
| Feature vt::TreeBuilder< Feature, Distance, FeatureAllocator >::zero_  [protected] | 
Definition at line 54 of file tree_builder.h.