MRPT  2.0.4
Classes | Typedefs | Functions
RANSAC and other model fitting algorithms

Detailed Description

Collaboration diagram for RANSAC and other model fitting algorithms:

Classes

class  mrpt::math::ModelSearch
 Model search implementations: RANSAC and genetic algorithm. More...
 
class  mrpt::math::RANSAC_Template< NUMTYPE, DATASET, MODEL >
 A generic RANSAC implementation. More...
 

Typedefs

using mrpt::math::RANSAC = RANSAC_Template< double >
 The default instance of RANSAC, for double type. More...
 

Functions

template<typename T >
size_t mrpt::math::ransacDatasetSize (const CMatrixDynamic< T > &dataset)
 Define overloaded functions for user types as required. More...
 

RANSAC detectors

template<typename NUMTYPE >
void mrpt::math::ransac_detect_3D_planes (const CVectorDynamic< NUMTYPE > &x, const CVectorDynamic< NUMTYPE > &y, const CVectorDynamic< NUMTYPE > &z, std::vector< std::pair< size_t, TPlane >> &out_detected_planes, const double threshold, const size_t min_inliers_for_valid_plane=10)
 Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers. More...
 
template<typename NUMTYPE >
void mrpt::math::ransac_detect_2D_lines (const CVectorDynamic< NUMTYPE > &x, const CVectorDynamic< NUMTYPE > &y, std::vector< std::pair< size_t, TLine2D >> &out_detected_lines, const double threshold, const size_t min_inliers_for_valid_line=5)
 Fit a number of 2-D lines to a given point cloud, automatically determining the number of existing lines by means of the provided threshold and minimum number of supporting inliers. More...
 
template<class POINTSMAP >
void mrpt::math::ransac_detect_3D_planes (const POINTSMAP *points_map, std::vector< std::pair< size_t, TPlane >> &out_detected_planes, const double threshold, const size_t min_inliers_for_valid_plane)
 A stub for ransac_detect_3D_planes() with the points given as a mrpt::maps::CPointsMap. More...
 

Typedef Documentation

◆ RANSAC

using mrpt::math::RANSAC = typedef RANSAC_Template<double>

The default instance of RANSAC, for double type.

Definition at line 96 of file ransac.h.

Function Documentation

◆ ransac_detect_2D_lines()

template<typename NUMTYPE >
void mrpt::math::ransac_detect_2D_lines ( const CVectorDynamic< NUMTYPE > &  x,
const CVectorDynamic< NUMTYPE > &  y,
std::vector< std::pair< size_t, TLine2D >> &  out_detected_lines,
const double  threshold,
const size_t  min_inliers_for_valid_line = 5 
)

Fit a number of 2-D lines to a given point cloud, automatically determining the number of existing lines by means of the provided threshold and minimum number of supporting inliers.

Parameters
out_detected_linesThe output list of pairs: number of supporting inliers, detected line.
thresholdThe maximum distance between a point and a temptative line such as the point is considered an inlier.
min_inliers_for_valid_lineThe minimum number of supporting inliers to consider a line as valid.

Definition at line 263 of file ransac_applications.cpp.

References ASSERT_, mrpt::math::CVectorDynamic< T >::empty(), mrpt::math::RANSAC_Template< NUMTYPE, DATASET, MODEL >::execute(), mrpt::system::LVL_INFO, MRPT_END, MRPT_START, mrpt::math::CMatrixDynamic< T >::setRow(), mrpt::system::COutputLogger::setVerbosityLevel(), and mrpt::math::CVectorDynamic< T >::size().

Here is the call graph for this function:

◆ ransac_detect_3D_planes() [1/2]

template<typename NUMTYPE >
void mrpt::math::ransac_detect_3D_planes ( const CVectorDynamic< NUMTYPE > &  x,
const CVectorDynamic< NUMTYPE > &  y,
const CVectorDynamic< NUMTYPE > &  z,
std::vector< std::pair< size_t, TPlane >> &  out_detected_planes,
const double  threshold,
const size_t  min_inliers_for_valid_plane = 10 
)

Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers.

Parameters
out_detected_planesThe output list of pairs: number of supporting inliers, detected plane.
thresholdThe maximum distance between a point and a temptative plane such as the point is considered an inlier.
min_inliers_for_valid_planeThe minimum number of supporting inliers to consider a plane as valid.

Referenced by mrpt::math::ransac_detect_3D_planes().

Here is the caller graph for this function:

◆ ransac_detect_3D_planes() [2/2]

template<class POINTSMAP >
void mrpt::math::ransac_detect_3D_planes ( const POINTSMAP *  points_map,
std::vector< std::pair< size_t, TPlane >> &  out_detected_planes,
const double  threshold,
const size_t  min_inliers_for_valid_plane 
)
inline

A stub for ransac_detect_3D_planes() with the points given as a mrpt::maps::CPointsMap.

Definition at line 64 of file ransac_applications.h.

References mrpt::math::ransac_detect_3D_planes().

Here is the call graph for this function:

◆ ransacDatasetSize()

template<typename T >
size_t mrpt::math::ransacDatasetSize ( const CMatrixDynamic< T > &  dataset)

Define overloaded functions for user types as required.

This default implementation assumes datasets in matrices, with each sample being a column, the dimensionality being the number of rows.

Definition at line 26 of file ransac.h.

References mrpt::math::CMatrixDynamic< T >::cols().

Referenced by mrpt::math::RANSAC_Template< NUMTYPE, DATASET, MODEL >::execute().

Here is the call graph for this function:
Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020