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. | |
| const Kmeans & | kmeans () const |
| Get the k-means clusterer. | |
| Kmeans & | kmeans () |
| 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 14 of file tree_builder.h.
| typedef std::vector<Feature, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::FeatureVector |
Definition at line 10 of file tree_builder.h.
| typedef SimpleKmeans<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Kmeans |
Definition at line 9 of file tree_builder.h.
| typedef MutableVocabularyTree<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Tree |
Definition at line 8 of file tree_builder.h.
| vt::TreeBuilder< Feature, Distance, FeatureAllocator >::TreeBuilder | ( | const Feature & | zero = Feature(), |
|
| Distance | d = Distance() | |||
| ) | [inline] |
Constructor.
| zero | Object representing zero in the feature space | |
| d | Functor for calculating squared distance |
Definition at line 56 of file tree_builder.h.
| void vt::TreeBuilder< Feature, Distance, FeatureAllocator >::build | ( | const FeatureVector & | training_features, | |
| uint32_t | k, | |||
| uint32_t | levels | |||
| ) | [inline] |
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 64 of file tree_builder.h.
| const Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans | ( | ) | const [inline] |
Get the k-means clusterer.
Definition at line 37 of file tree_builder.h.
| Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans | ( | ) | [inline] |
Get the k-means clusterer.
Definition at line 35 of file tree_builder.h.
| const Tree& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree | ( | ) | const [inline] |
Get the built vocabulary tree.
Definition at line 32 of file tree_builder.h.
Kmeans vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans_ [protected] |
Definition at line 41 of file tree_builder.h.
Tree vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree_ [protected] |
Definition at line 40 of file tree_builder.h.
Feature vt::TreeBuilder< Feature, Distance, FeatureAllocator >::zero_ [protected] |
Definition at line 42 of file tree_builder.h.