Main Page | Modules | Namespace List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RANSAC robust estimation


Classes

struct  tag::Point4SE3Estimation< ImagePlaneZ >
struct  tag::essential_matrix::EssentialMatrix
struct  tag::AffineHomography

Functions

template<class Obs, class Trans, class Tol>
size_t tag::find_RANSAC_inliers (const std::vector< Obs > &observations, int sample_size, const Tol &tolerance, size_t N, Trans &best, std::vector< bool > &inlier)
template<class Obs, class Trans, class Tol>
double tag::find_MSAC_inliers (const std::vector< Obs > &observations, int sample_size, const Tol &tolerance, size_t N, Trans &best, std::vector< bool > &inlier)
template<class Obs, class Trans, class Tol, class Prob>
size_t tag::find_RANSAC_inliers_guided_breadth_first (const std::vector< Obs > &observations, const Prob &prob, int sample_size, const Tol &tolerance, size_t N, size_t block_size, Trans &best, std::vector< bool > &inlier)
template<class Obs, class Trans, class Tol>
size_t tag::find_RANSAC_inliers_breadth_first (const std::vector< Obs > &observations, int sample_size, const Tol &tolerance, size_t N, size_t block_size, Trans &best, std::vector< bool > &inlier)
template<class T, class U>
void tag::remove_if_false (std::vector< T > &v, const std::vector< U > &flag)

Detailed Description

This group contains a set of RANSAC implementations to estimate an inlier set from a set of correspondences under a transformation. The functions are both templated on the correspondence data type and the estimator for the transformation.

Function Documentation

template<class Obs, class Trans, class Tol>
double find_MSAC_inliers const std::vector< Obs > &  observations,
int  sample_size,
const Tol &  tolerance,
size_t  N,
Trans &  best,
std::vector< bool > &  inlier
 

basic MSAC implementation. The function is templated on the observation data type and the transformation data type which must conform to the following interface:

    class Estimator {
        Estimator();
        // Estimate from a sequence of observations
        template <class It> bool estimate(It begin, It End);
        // return the score for the given observation
        template <class Obs, class Tol> double score(const Obs& obs) const;
    };
see the file ransac_estimators.h for some Estimator classes for various transformations.
Parameters:
[in] observations a vector of observations (usually point matches)
[in] sample_size the number of samples used estimate a transformation
[in] tolerance the tolerance (passed with each observation) to the transformation to check for inliers
[in] N the number of hypotheses to test
[out] best the transformation hypothesis with the highest inlier count
[out] inlier a vector of bools that describes the inlier set of the winning hypothesis
Returns:
the score of the winning hypothesis

template<class Obs, class Trans, class Tol>
size_t find_RANSAC_inliers const std::vector< Obs > &  observations,
int  sample_size,
const Tol &  tolerance,
size_t  N,
Trans &  best,
std::vector< bool > &  inlier
 

basic RANSAC implementation. The function is templated on the observation data type and the transformation data type which must conform to the following interface:

    class Estimator {
        Estimator();
        // Estimate from a sequence of observations
        template <class It> bool estimate(It begin, It End);
        // Check whether the given observation is an inlier for this estimate (with specified tolerance)
        template <class Obs, class Tol> bool isInlier(const Obs& obs, const Tol& tolerance) const;
    };
see the file ransac_estimators.h for some Estimator classes for various transformations.
Parameters:
[in] observations a vector of observations (usually point matches)
[in] sample_size the number of samples used estimate a transformation
[in] tolerance the tolerance (passed with each observation) to the transformation to check for inliers
[in] N the number of hypotheses to test
[out] best the transformation hypothesis with the highest inlier count
[out] inlier a vector of bools that describes the inlier set of the winning hypothesis
Returns:
the number of inliers for the winning hypothesis

template<class Obs, class Trans, class Tol>
size_t find_RANSAC_inliers_breadth_first const std::vector< Obs > &  observations,
int  sample_size,
const Tol &  tolerance,
size_t  N,
size_t  block_size,
Trans &  best,
std::vector< bool > &  inlier
 

Breadth-first RANSAC implementation. The function is templated on the observation data type, the tolerance for inliers, and the transformation data type which must conform to the following interface:

    class Estimator {
        Estimator();
        // Estimate from a sequence of observations
        template <class It> bool estimate(It begin, It End);
        // Check whether the given observation is an inlier for this estimate (with specified tolerance)
        template <class Obs, class Tol> bool isInlier(const Obs& obs, const Tol& tolerance) const;
    };
All hypotheses are generated first, and preemptively discarded as more observations are examined. see the file ransac_estimators.h for some Estimator classes for various transformations.
Parameters:
[in] observations a vector of observations (usually point matches)
[in] sample_size the number of samples used estimate a transformation
[in] tolerance the tolerance (passed with each observation) to the transformation to check for inliers
[in] N the number of hypotheses to test
[in] block_size the number of hypotheses to test in a block (between culling hypotheses)
[out] best the transformation hypothesis with the highest inlier count
[out] inlier a vector of bools that describes the inlier set of the winning hypothesis
Returns:
the number of inliers for the winning hypothesis

template<class Obs, class Trans, class Tol, class Prob>
size_t find_RANSAC_inliers_guided_breadth_first const std::vector< Obs > &  observations,
const Prob &  prob,
int  sample_size,
const Tol &  tolerance,
size_t  N,
size_t  block_size,
Trans &  best,
std::vector< bool > &  inlier
 

Guided breadth-first RANSAC implementation. The function is templated on the observation data type, the probability density for observation correctness, the tolerance for inliers, and the transformation data type which must conform to the following interface:

    class Estimator {
        Estimator();
        // Estimate from a sequence of observations
        template <class It> bool estimate(It begin, It End);
        // Check whether the given observation is an inlier for this estimate (with specified tolerance)
        template <class Obs, class Tol> bool isInlier(const Obs& obs, const Tol& tolerance) const;
    };
All hypotheses are generated first, and preemptively discarded as more observations are examined. The sample sets for hypotheses are drawn probabilistically using the specified probability density. see the file ransac_estimators.h for some Estimator classes for various transformations.
Parameters:
[in] observations a vector of observations (usually point matches)
[in] prob the probability predicate applied (as a function object) to each observation to compute its prior probability of being correct
[in] sample_size the number of samples used estimate a transformation
[in] tolerance the tolerance (passed with each observation) to the transformation to check for inliers
[in] N the number of hypotheses to test
[in] block_size the number of hypotheses to test in a block (between culling hypotheses)
[out] best the transformation hypothesis with the highest inlier count
[out] inlier a vector of bools that describes the inlier set of the winning hypothesis
Returns:
the number of inliers for the winning hypothesis

template<class T, class U>
void remove_if_false std::vector< T > &  v,
const std::vector< U > &  flag
 

helper function for use with ransac functions. It removes elements of an input vector based on another vector which is interpreted as boolean flags signaling removal from the first vector or not.

Parameters:
[in,out] v vector with data to remove
[in] flag vector interpreted as flags, if false the corresponding element from v is removed


Generated on Wed Aug 8 14:30:36 2007 for TooN Algorithm Library - tag by  doxygen 1.3.9.1