#include <ransac.h>
Public Member Functions | |
bool | computeModel (int debug=0) |
Compute the actual model and find the inliers. More... | |
RANSAC (SACModel *model) | |
RANSAC (RAndom SAmple Consensus) main constructor. More... | |
RANSAC (SACModel *model, double threshold) | |
RANSAC (RAndom SAmple Consensus) main constructor. More... | |
virtual | ~RANSAC () |
Public Member Functions inherited from sample_consensus::SAC | |
virtual void | computeCoefficients (std::vector< double > &coefficients) |
Compute the coefficients of the model and return them. More... | |
virtual std::vector< int > | getInliers () |
Get a list of the model inliers, found after computeModel () More... | |
PointCloud | getPointCloud (std::vector< int > indices) |
Return the point cloud representing a set of given indices. More... | |
std::set< int > | getRandomSamples (PointCloud points, int nr_samples) |
Get a set of randomly selected indices. More... | |
std::set< int > | getRandomSamples (PointCloud points, std::vector< int > indices, int nr_samples) |
Get a vector of randomly selected indices. More... | |
virtual void | projectPointsToModel (const std::vector< int > &indices, const std::vector< double > &model_coefficients, PointCloud &projected_points) |
Project a set of given points (using their indices) onto the model and return their projections. More... | |
virtual void | refineCoefficients (std::vector< double > &refined_coefficients) |
Use Least-Squares optimizations to refine the coefficients of the model, and return them. More... | |
virtual int | removeInliers () |
Remove the model inliers from the list of data indices. Returns the number of indices left. More... | |
SAC () | |
Constructor for base SAC. More... | |
SAC (SACModel *model) | |
Constructor for base SAC. More... | |
virtual void | setMaxIterations (int max_iterations) |
Set the maximum number of iterations. More... | |
virtual void | setProbability (double probability) |
Set the desired probability of choosing at least one sample free from outliers. More... | |
virtual void | setThreshold (double threshold) |
Set the threshold to model. More... | |
virtual | ~SAC () |
Destructor for base SAC. More... | |
Additional Inherited Members | |
Protected Attributes inherited from sample_consensus::SAC | |
int | iterations_ |
Total number of internal loop iterations that we've done so far. More... | |
int | max_iterations_ |
Maximum number of iterations before giving up. More... | |
double | probability_ |
Desired probability of choosing at least one sample free from outliers. More... | |
SACModel * | sac_model_ |
The underlying data model used (i.e. what is it that we attempt to search for). More... | |
double | threshold_ |
Distance to model threshold. More... | |
sample_consensus::RANSAC::RANSAC | ( | SACModel * | model | ) |
RANSAC (RAndom SAmple Consensus) main constructor.
model | a Sample Consensus model |
Definition at line 58 of file ransac.cpp.
sample_consensus::RANSAC::RANSAC | ( | SACModel * | model, |
double | threshold | ||
) |
RANSAC (RAndom SAmple Consensus) main constructor.
model | a Sample Consensus model |
threshold | distance to model threshold |
Definition at line 43 of file ransac.cpp.
|
virtual |
Compute the actual model and find the inliers.
debug | enable/disable on-screen debug information |
Implements sample_consensus::SAC.
Definition at line 65 of file ransac.cpp.