10#ifndef SFM_MATCHING_HEADER
11#define SFM_MATCHING_HEADER
73 oneway_match (
Options const& options,
74 T
const* set_1,
int set_1_size,
75 T
const* set_2,
int set_2_size,
76 std::vector<int>* result);
85 twoway_match (
Options const& options,
86 T
const* set_1,
int set_1_size,
87 T
const* set_2,
int set_2_size,
96 remove_inconsistent_matches (
Result* matches);
102 count_consistent_matches (
Result const& matches);
108 combine_results(
Result const& sift_result,
116Matching::oneway_match (
Options const& options,
117 T
const* set_1,
int set_1_size,
118 T
const* set_2,
int set_2_size,
119 std::vector<int>* result)
122 result->resize(set_1_size, -1);
123 if (set_1_size == 0 || set_2_size == 0)
133 for (
int i = 0; i < set_1_size; ++i)
137 nn.
find(query_pointer, &nn_result);
150Matching::twoway_match (
Options const& options,
151 T
const* set_1,
int set_1_size,
152 T
const* set_2,
int set_2_size,
155 Matching::oneway_match(options, set_1, set_1_size,
157 Matching::oneway_match(options, set_2, set_2_size,
Nearest (and second nearest) neighbor search for normalized vectors.
void set_element_dimensions(int element_dimensions)
For SfM, this is the descriptor length.
void find(T const *query, Result *result) const
Find the nearest neighbor of 'query'.
void set_elements(T const *elements)
For SfM, this is the descriptor memory block.
void set_num_elements(int num_elements)
For SfM, this is the number of descriptors.
#define SFM_NAMESPACE_END
#define SFM_NAMESPACE_BEGIN
Feature matching options.
int descriptor_length
The length of the descriptor.
float lowe_ratio_threshold
Requires that the ratio between the best and second best matching distance is below some threshold.
float distance_threshold
Does not accept matches with distances larger than this value.
Feature matching result reported as two lists, each with indices in the other set.
std::vector< int > matches_1_2
std::vector< int > matches_2_1
Unlike the naming suggests, these are square distances.