18 #ifndef PIC_FEATURES_MATCHING_HASH_TABLE_LSH_HPP 19 #define PIC_FEATURES_MATCHING_HASH_TABLE_LSH_HPP 25 #include "../features_matching/brief_descriptor.hpp" 29 #ifndef PIC_DISABLE_EIGEN 39 std::vector< unsigned int *> *
descs;
40 std::vector< unsigned int > *
table;
61 size_ui =
sizeof(
unsigned int) * 8;
63 for(
unsigned int i = 0; i <
descs->size(); i++) {
65 table[address].push_back(i);
76 unsigned int address = 0;
78 unsigned int pos =
g_f[i];
80 unsigned int block = pos /
size_ui;
81 unsigned int pos_block = pos %
size_ui;
83 unsigned int bit = (desc[block] >> pos_block) & 0x1;
100 void getNearest(
unsigned int * desc,
int &matched_j,
unsigned int &dist_1,
unsigned int &dist_2)
104 for(
unsigned int i=0; i<
table[address].size(); i++) {
105 unsigned int j =
table[address].at(i);
std::vector< unsigned int * > * descs
Definition: hash_table_lsh.hpp:39
The Hash class.
Definition: hash_table_lsh.hpp:34
unsigned int nTable
Definition: hash_table_lsh.hpp:41
unsigned int size_ui
Definition: hash_table_lsh.hpp:42
void getNearest(unsigned int *desc, int &matched_j, unsigned int &dist_1, unsigned int &dist_2)
getNearest
Definition: hash_table_lsh.hpp:100
unsigned int getAddress(unsigned int *desc)
getAddress
Definition: hash_table_lsh.hpp:74
unsigned int desc_size
Definition: hash_table_lsh.hpp:42
HashTableLSH(unsigned int hash_size, unsigned int *g_f, std::vector< unsigned int *> *descs, unsigned int desc_size)
Definition: hash_table_lsh.hpp:44
static uint match(uint *fv0, uint *fv1, uint nfv)
match matches two descriptors. Note: Higher scores means better matching.
Definition: brief_descriptor.hpp:255
unsigned int * g_f
Definition: hash_table_lsh.hpp:37
Definition: bilateral_separation.hpp:25
unsigned int hash_size
Definition: hash_table_lsh.hpp:42
std::vector< unsigned int > * table
Definition: hash_table_lsh.hpp:40