Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions
jafar::jmath::RANSAC< NUMTYPE > Class Template Reference

An implementation of the RANSAC algorithm for robust fitting of models to data. More...


Detailed Description

template<typename NUMTYPE = double>
class jafar::jmath::RANSAC< NUMTYPE >

An implementation of the RANSAC algorithm for robust fitting of models to data.

Definition at line 16 of file ransac.hpp.

#include <ransac.hpp>

List of all members.

Public Types

typedef void(* RANSAC_fit_functor )(const ublas::matrix< NUMTYPE > &data, const std::vector< size_t > &indices, ublas::vector< ublas::matrix< NUMTYPE > > &fit_models)
 The type of the fitting function passed to jafar::jmath::ransac.
typedef void(* RANSAC_distance_functor )(const ublas::matrix< NUMTYPE > &data, const ublas::vector< ublas::matrix< NUMTYPE > > &test_models, NUMTYPE distance_threshold, unsigned int &best_model_index, std::vector< size_t > &inlier_indices)
 The type of the distance function passed to jafar::jmath::ransac.
typedef bool(* RANSAC_degenerate_functor )(const ublas::matrix< NUMTYPE > &data, const std::vector< size_t > &indices)
 The type of the function passed to mrpt::math::ransac.

Static Public Member Functions

static bool execute (const ublas::matrix< NUMTYPE > &data, RANSAC_fit_functor fit_func, RANSAC_distance_functor dist_func, RANSAC_degenerate_functor degen_func, const NUMTYPE distance_threshold, const unsigned int min_size_samples_to_fit, std::vector< size_t > &out_best_inliers, ublas::matrix< NUMTYPE > &out_best_model, const NUMTYPE prob_good_sample=0.999, const size_t max_iter=200000)
 execution task

Member Function Documentation

template<typename NUMTYPE = double>
static bool jafar::jmath::RANSAC< NUMTYPE >::execute ( const ublas::matrix< NUMTYPE > &  data,
RANSAC_fit_functor  fit_func,
RANSAC_distance_functor  dist_func,
RANSAC_degenerate_functor  degen_func,
const NUMTYPE  distance_threshold,
const unsigned int  min_size_samples_to_fit,
std::vector< size_t > &  out_best_inliers,
ublas::matrix< NUMTYPE > &  out_best_model,
const NUMTYPE  prob_good_sample = 0.999,
const size_t  max_iter = 200000 
) [inline, static]

execution task

Parameters:
dataA DxN matrix with all the observed data. D is the dimensionality of data points and N the number of points.
This implementation is highly inspired on Peter Kovesi's MATLAB scripts (http://www.csse.uwa.edu.au/~pk).
Returns:
false if no good solution can be found, true on success.

Definition at line 44 of file ransac.hpp.

References JFR_ASSERT, and JFR_DEBUG.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:40 for Jafar by doxygen 1.7.6.1
LAAS-CNRS