template class mrpt::tfest::TMatchingPairListTempl

A list of TMatchingPair.

#include <mrpt/tfest/TMatchingPair.h>

template <typename T>
class TMatchingPairListTempl: public std::vector< TMatchingPairTempl< T > >
{
public:
    // typedefs

    typedef std::vector<TMatchingPairTempl<T>> base_t;

    //
methods

    bool indexOtherMapHasCorrespondence(size_t idx) const;
    void dumpToFile(const std::string& fileName) const;
    void saveAsMATLABScript(const std::string& filName) const;
    T overallSquareError(const mrpt::poses::CPose2D& q) const;
    T overallSquareErrorAndPoints(const mrpt::poses::CPose2D& q, std::vector<T>& xs, std::vector<T>& ys) const;
    void squareErrorVector(const mrpt::poses::CPose2D& q, std::vector<T>& out_sqErrs) const;

    void squareErrorVector(
        const mrpt::poses::CPose2D& q,
        std::vector<T>& out_sqErrs,
        std::vector<T>& xs,
        std::vector<T>& ys
        ) const;

    bool contains(const TMatchingPairTempl<T>& p) const;

    void filterUniqueRobustPairs(
        const size_t num_elements_this_map,
        TMatchingPairListTempl<T>& out_filtered_list
        ) const;
};

Methods

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.

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”

iei

Where ei are the elements of the square error vector as computed by computeSquareErrorVector.

See also:

squareErrorVector, overallSquareErrorAndPoints

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.

iei

Where ei are the elements of the square error vector as computed by computeSquareErrorVector

See also:

squareErrorVector

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 2D transformation “q” Each element ei is the square distance between the “this” (global) point and the “other” (local) point transformed through “q”:

ei=|xthisqxother|2

.

See also:

overallSquareError

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 ei is the square distance between the “this” (global) point and the “other” (local) point transformed through “q”:

ei=|xthisqxother|2

.

See also:

overallSquareError

bool contains(const TMatchingPairTempl<T>& p) const

Test whether the given pair “p” is within the pairings.

void filterUniqueRobustPairs(
    const 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 i in map this is the best match for element j in map other, and viceversa