Vocabulary tree wrapper for easy integration with OpenCV features, or when the (dense) descriptor size and/or type isn't known at compile time. More...
#include <generic_tree.h>
Public Member Functions | |
size_t | dimension () const |
Returns the number of elements in a feature used by this tree. | |
GenericTree () | |
Constructor, empty tree. | |
GenericTree (const std::string &file) | |
Constructor, loads vocabulary from file. | |
void | load (const std::string &file) |
Load vocabulary from a file. | |
void | save (const std::string &file) const |
Save vocabulary to a file. |
Vocabulary tree wrapper for easy integration with OpenCV features, or when the (dense) descriptor size and/or type isn't known at compile time.
cv::Mat
is used as the feature type. If the feature type is known at compile time, the VocabularyTree template may be considerably more efficient.
Definition at line 34 of file generic_tree.h.
Constructor, empty tree.
Definition at line 7 of file generic_tree.cpp.
vt::GenericTree::GenericTree | ( | const std::string & | file | ) |
Constructor, loads vocabulary from file.
Definition at line 11 of file generic_tree.cpp.
size_t vt::GenericTree::dimension | ( | ) | const |
Returns the number of elements in a feature used by this tree.
Definition at line 76 of file generic_tree.cpp.
void vt::GenericTree::load | ( | const std::string & | file | ) |
Load vocabulary from a file.
Reimplemented from vt::VocabularyTree< cv::Mat >.
Definition at line 34 of file generic_tree.cpp.
void vt::GenericTree::save | ( | const std::string & | file | ) | const |
Save vocabulary to a file.
Reimplemented from vt::VocabularyTree< cv::Mat >.
Definition at line 18 of file generic_tree.cpp.