Template Class TMatchingPairListTempl
Defined in File TMatchingPair.h
Inheritance Relationships
Base Type
public std::vector< TMatchingPairTempl< T > >
Class Documentation
-
template<typename T>
class TMatchingPairListTempl : public std::vector<TMatchingPairTempl<T>> A list of TMatchingPair.
Public Types
-
using base_t = std::vector<TMatchingPairTempl<T>>
Public Functions
-
bool indexOtherMapHasCorrespondence(size_t idx) const
Checks if the given index from the “other” map appears in the list.
-
void dumpToFile(const std::string &fileName) const
Saves the correspondences to a text file, with each line containing these columns:
globalIdx localIdx gx gy gz lx ly lz errSqrYou can also use:
for a human-friendly description of contents.for (const auto &c: corrs) std::cout << c << "\n";
-
void saveAsMATLABScript(const std::string &filName) const
Saves the correspondences as a MATLAB script which draws them.
-
T overallSquareError(const mrpt::poses::CPose2D &q) const
Computes the overall square error between the 2D points in the list of correspondences, given the 2D transformation “q”
\[ \sum\limits_i e_i \]Where \( e_i \) are the elements of the square error vector as computed by squareErrorVector()See also
-
T overallSquareErrorAndPoints(const mrpt::poses::CPose2D &q, std::vector<T> &xs, std::vector<T> &ys) const
Computes the overall square error between the 2D points in the list of correspondences, given the 2D transformation “q”, and return the transformed points as well.
\[ \sum\limits_i e_i \]Where \( e_i \) are the elements of the square error vector as computed by squareErrorVector()See also
-
void squareErrorVector(const mrpt::poses::CPose2D &q, std::vector<T> &out_sqErrs) const
Returns a vector with the square error between each pair of correspondences in the list, given the SE(2) transformation
qEach element \( e_i \) is the square distance between the “this” (global) point and the “other” (local) point transformed through “q”:\[ e_i = | x_{this} - q \oplus x_{other} |^2 \]See also
-
void squareErrorVector(const mrpt::poses::CPose2D &q, std::vector<T> &out_sqErrs, std::vector<T> &xs, std::vector<T> &ys) const
Returns a vector with the square error between each pair of correspondences in the list and the transformed “other” (local) points, given the 2D transformation “q” Each element \( e_i \) is the square distance between the “this” (global) point and the “other” (local) point transformed through “q”:
\[ e_i = | x_{this} - q \oplus x_{other} |^2 \]See also
-
bool contains(const TMatchingPairTempl<T> &p) const
Test whether the given pair “p” is within the pairings
-
void filterUniqueRobustPairs(size_t num_elements_this_map, TMatchingPairListTempl<T> &out_filtered_list) const
Creates a filtered list of pairings with those ones which have a single correspondence which coincides in both directions, i.e. the best pairing of element
iin mapthisis the best match for elementjin mapother, and viceversa
-
using base_t = std::vector<TMatchingPairTempl<T>>