Defined in File matching-problem.h
Defines the specifics of a matching problem.
defines the specifics of a matching problem
The problem is assumed to have two visual frames (apple_frame and banana_frame) filled with keypoints and binary descriptors and a rotation matrix taking vectors from the banana frame into the apple frame. The problem matches banana features against apple features.
Coordinate Frames: A: apple frame B: banana frame
IMPORTANT NOTE: If you create a new matching problem inheriting from this class, make sure not to forget to add the ASLAM_ADD_MATCH_TYPEDEFS_WITH_ALIASES( NewMatchingProblemClassName, alias_for_getAppleIndex, alias_for_getBananaIndex) macro in the public class body! Otherwise, no matches type will be available for the new problem and compilation will fail.
The problem is assumed to have two lists (Apples and Bananas) whose elements can be referenced by a linear index. The problem defines the score and scoring function between two elements of the lists, and a method to get a short list of candidates from list Apples for elements of list Bananas.
The match is not necessarily symmetric. For example, Apples can represent a reference and Bananas queries.
Subclassed by aslam::MatchingProblemFrameToFrame
MatchingProblem() = default¶
~MatchingProblem() = default¶
numApples() const = 0¶
numBananas() const = 0¶
inline virtual void
Get a short list of candidates for all banana indices.
Return all indices of list a for n^2 matching; or use something smarter like nabo to get nearest neighbors. Can also be used to mask out invalid elements in the lists, or an invalid b, by returning and empty candidate list.
The score for each candidate is a rough score that can be used for sorting, pre-filtering, and will be explicitly recomputed using the computeScore function.
[out] candidates_for_bananas: Candidates from the Apples-list that could potentially match for each banana.
inline virtual void
Get a short list of candidates for a given banana index.
[in] banana_index: The index of the banana queried for candidates.
[out] candidates_for_bananas: Candidates from the Apples-list that could potentially match for each element of Bananas.
doSetup() = 0¶
Gets called at the beginning of the matching problem; i.e.
to setup kd-trees, lookup tables or the like.