|
vocabtree
0.0.1
|
Abstract class from which all search structures and methods derive from. More...
#include <search_base.hpp>

Public Member Functions | |
| SearchBase () | |
| SearchBase (const std::string &file_path) | |
| virtual | ~SearchBase () |
| virtual bool | train (Dataset &dataset, const std::shared_ptr< const TrainParamsBase > ¶ms, const std::vector< std::shared_ptr< const Image > > &examples)=0 |
| Given a set of training parameters, list of images, trains. More... | |
| std::vector< std::shared_ptr < MatchResultsBase > > | search (Dataset &dataset, const std::shared_ptr< SearchParamsBase > ¶ms, const std::vector< std::shared_ptr< const Image > > &examples) |
| Given a set of search parameters, list of query images, searches for matching images and returns the result matches. More... | |
| virtual bool | load (const std::string &file_path)=0 |
| Loads a trained search structure from the input filepath. More... | |
| virtual bool | save (const std::string &file_path) const =0 |
| Saves a trained search structure to the input filepath. More... | |
Protected Member Functions | |
| virtual std::shared_ptr < MatchResultsBase > | search (Dataset &dataset, const std::shared_ptr< const SearchParamsBase > ¶ms, const std::shared_ptr< const Image > &example)=0 |
| Given a set of search parameters, a query images, searches for matching images and returns the match. More... | |
Abstract class from which all search structures and methods derive from.
Each search method must implement train, search, load and save.
Definition at line 29 of file search_base.hpp.
| SearchBase::SearchBase | ( | ) |
Definition at line 3 of file search_base.cxx.
| SearchBase::SearchBase | ( | const std::string & | file_path | ) |
Definition at line 4 of file search_base.cxx.
|
virtual |
Definition at line 6 of file search_base.cxx.
|
pure virtual |
Loads a trained search structure from the input filepath.
Implemented in BagOfWords, InvertedIndex, and VocabTree.
|
pure virtual |
Saves a trained search structure to the input filepath.
Implemented in BagOfWords, InvertedIndex, and VocabTree.
| std::vector< std::shared_ptr< MatchResultsBase > > SearchBase::search | ( | Dataset & | dataset, |
| const std::shared_ptr< SearchParamsBase > & | params, | ||
| const std::vector< std::shared_ptr< const Image > > & | examples | ||
| ) |
Given a set of search parameters, list of query images, searches for matching images and returns the result matches.
Definition at line 8 of file search_base.cxx.
|
protectedpure virtual |
Given a set of search parameters, a query images, searches for matching images and returns the match.
Implemented in InvertedIndex, BagOfWords, and VocabTree.
|
pure virtual |
Given a set of training parameters, list of images, trains.
Returns true if successful, false if not successful.
Implemented in BagOfWords, InvertedIndex, and VocabTree.