Optimized vocabulary tree quantizer, templated on feature type and distance metric for maximum efficiency.
More...
|
| | VocabularyTree (const std::string &file) |
| | Create from vocabulary file. More...
|
| |
|
template<class DescriptorT > |
| Word | quantize (const DescriptorT &feature) const |
| | Quantizes a feature into a discrete word.
|
| |
|
template<class DescriptorT > |
| std::vector< Word > | quantize (const std::vector< DescriptorT > &features) const |
| | Quantizes a set of features into visual words.
|
| |
|
template<class DescriptorT > |
| SparseHistogram | quantizeToSparse (const std::vector< DescriptorT > &features) const |
| | Quantizes a set of features into sparse histogram of visual words.
|
| |
| SparseHistogram | quantizeToSparse (const void *blindDescriptors) const override |
| | Create a SparseHistogram from a blind vector of descriptors. More...
|
| |
|
uint32_t | levels () const override |
| | Get the depth (number of levels) of the tree.
|
| |
|
uint32_t | splits () const override |
| | Get the branching factor (max splits at each node) of the tree.
|
| |
|
uint32_t | words () const override |
| | Get the number of words the tree contains.
|
| |
|
void | clear () override |
| | Clears vocabulary, leaving an empty tree.
|
| |
| void | save (const std::string &file) const override |
| | Save vocabulary to a file. More...
|
| |
|
void | load (const std::string &file) override |
| | Load vocabulary from a file.
|
| |
|
bool | operator== (const VocabularyTree &other) const |
| |
template<class Feature, template< typename, typename > class Distance = L2>
class aliceVision::voctree::VocabularyTree< Feature, Distance >
Optimized vocabulary tree quantizer, templated on feature type and distance metric for maximum efficiency.
Feature is the data type of one feature. It has no requirements except compatibility with the distance metric.
Distance is a functor that computes the distance between two Feature objects. It must have a result_type typedef specifying the type of the returned distance. For the purposes of VocabularyTree, this need not even be a metric; distances simply need to be comparable.