Recognizes previously seen frames. More...
#include <place_recognizer.h>
Public Member Functions | |
void | findAndInsert (const frame_common::Frame &frame, uint32_t id, const FrameVector &all_frames, size_t N, std::vector< const frame_common::Frame * > &matches) |
Find the top N matches for the query frame, and also insert it for future recognition. | |
void | insert (const frame_common::Frame &frame, uint32_t id) |
Insert a new frame with the provided id. | |
PlaceRecognizer (const std::string &tree_file, const std::string &weights_file) | |
Constructor. | |
Private Attributes | |
vt::Database | database_ |
vt::GenericTree | tree_ |
std::vector< uint32_t > | user_ids_ |
Recognizes previously seen frames.
Definition at line 48 of file place_recognizer.h.
vslam::PlaceRecognizer::PlaceRecognizer | ( | const std::string & | tree_file, | |
const std::string & | weights_file | |||
) |
Constructor.
Can use: PlaceRecognizer("/u/mihelich/vocab/holidays.tree", "/u/mihelich/vocab/holidays.weights")
tree_file | The file containing the vocabulary words | |
weights_file | The file containing the weights |
Definition at line 5 of file place_recognizer.cpp.
void vslam::PlaceRecognizer::findAndInsert | ( | const frame_common::Frame & | frame, | |
uint32_t | id, | |||
const FrameVector & | all_frames, | |||
size_t | N, | |||
std::vector< const frame_common::Frame * > & | matches | |||
) |
Find the top N matches for the query frame, and also insert it for future recognition.
frame | The query frame, also to be inserted | |
id | The id to assign to the query frame | |
all_frames | Collection of frames indexable by the saved ids | |
N | The number of matches | |
[out] | matches | The top N matching frames |
Definition at line 24 of file place_recognizer.cpp.
void vslam::PlaceRecognizer::insert | ( | const frame_common::Frame & | frame, | |
uint32_t | id | |||
) |
Insert a new frame with the provided id.
frame | The frame to insert | |
id | The frame id |
Definition at line 12 of file place_recognizer.cpp.
vt::Database vslam::PlaceRecognizer::database_ [private] |
Definition at line 87 of file place_recognizer.h.
vt::GenericTree vslam::PlaceRecognizer::tree_ [private] |
Definition at line 86 of file place_recognizer.h.
std::vector<uint32_t> vslam::PlaceRecognizer::user_ids_ [private] |
Definition at line 88 of file place_recognizer.h.