#include <sac.h>
Definition at line 44 of file sac.h.
sample_consensus::SAC::SAC |
( |
| ) |
|
|
inline |
Constructor for base SAC.
Definition at line 50 of file sac.h.
sample_consensus::SAC::SAC |
( |
SACModel * |
model | ) |
|
|
inline |
Constructor for base SAC.
- Parameters
-
model | a SAmple Consensus model |
Definition at line 59 of file sac.h.
virtual sample_consensus::SAC::~SAC |
( |
| ) |
|
|
inlinevirtual |
Destructor for base SAC.
Definition at line 66 of file sac.h.
virtual void sample_consensus::SAC::computeCoefficients |
( |
std::vector< double > & |
coefficients | ) |
|
|
inlinevirtual |
Compute the coefficients of the model and return them.
Definition at line 105 of file sac.h.
virtual bool sample_consensus::SAC::computeModel |
( |
int |
debug = 0 | ) |
|
|
pure virtual |
virtual std::vector<int> sample_consensus::SAC::getInliers |
( |
| ) |
|
|
inlinevirtual |
Get a list of the model inliers, found after computeModel ()
Definition at line 128 of file sac.h.
PointCloud SAC::getPointCloud |
( |
std::vector< int > |
indices | ) |
|
Return the point cloud representing a set of given indices.
return the point cloud representing a set of given indices.
- Parameters
-
indices | a set of indices that represent the data that we're interested in |
Definition at line 41 of file sac.cpp.
std::set<int> sample_consensus::SAC::getRandomSamples |
( |
PointCloud |
points, |
|
|
int |
nr_samples |
|
) |
| |
|
inline |
Get a set of randomly selected indices.
- Note
- Since we return a set, we do not guarantee that we'll return precisely the desired number of samples (ie. nr_samples).
- Parameters
-
points | the point cloud data set to be used |
nr_samples | the desired number of point indices |
Definition at line 161 of file sac.h.
std::set<int> sample_consensus::SAC::getRandomSamples |
( |
PointCloud |
points, |
|
|
std::vector< int > |
indices, |
|
|
int |
nr_samples |
|
) |
| |
|
inline |
Get a vector of randomly selected indices.
- Note
- Since we return a set, we do not guarantee that we'll return precisely the desired number of samples (ie. nr_samples).
- Parameters
-
points | the point cloud data set to be used (unused) |
indices | a set of indices that represent the data that we're interested in |
nr_samples | the desired number of point indices |
Definition at line 178 of file sac.h.
virtual void sample_consensus::SAC::projectPointsToModel |
( |
const std::vector< int > & |
indices, |
|
|
const std::vector< double > & |
model_coefficients, |
|
|
PointCloud & |
projected_points |
|
) |
| |
|
inlinevirtual |
Project a set of given points (using their indices) onto the model and return their projections.
- Parameters
-
indices | a set of indices that represent the data that we're interested in |
model_coefficients | the coefficients of the underlying model |
projected_points | the resultant projected points |
Definition at line 146 of file sac.h.
virtual void sample_consensus::SAC::refineCoefficients |
( |
std::vector< double > & |
refined_coefficients | ) |
|
|
inlinevirtual |
Use Least-Squares optimizations to refine the coefficients of the model, and return them.
- Parameters
-
refit_coefficients | the resultant recomputed coefficients after non-linear optimization |
Definition at line 116 of file sac.h.
virtual int sample_consensus::SAC::removeInliers |
( |
| ) |
|
|
inlinevirtual |
Remove the model inliers from the list of data indices. Returns the number of indices left.
Definition at line 123 of file sac.h.
virtual void sample_consensus::SAC::setMaxIterations |
( |
int |
max_iterations | ) |
|
|
inlinevirtual |
Set the maximum number of iterations.
- Parameters
-
max_iterations | maximum number of iterations |
Definition at line 83 of file sac.h.
virtual void sample_consensus::SAC::setProbability |
( |
double |
probability | ) |
|
|
inlinevirtual |
Set the desired probability of choosing at least one sample free from outliers.
- Parameters
-
probability | the desired probability of choosing at least one sample free from outliers |
Definition at line 93 of file sac.h.
virtual void sample_consensus::SAC::setThreshold |
( |
double |
threshold | ) |
|
|
inlinevirtual |
Set the threshold to model.
- Parameters
-
threshold | distance to model threshold |
Definition at line 73 of file sac.h.
int sample_consensus::SAC::iterations_ |
|
protected |
Total number of internal loop iterations that we've done so far.
Definition at line 194 of file sac.h.
int sample_consensus::SAC::max_iterations_ |
|
protected |
Maximum number of iterations before giving up.
Definition at line 197 of file sac.h.
double sample_consensus::SAC::probability_ |
|
protected |
Desired probability of choosing at least one sample free from outliers.
Definition at line 191 of file sac.h.
SACModel* sample_consensus::SAC::sac_model_ |
|
protected |
The underlying data model used (i.e. what is it that we attempt to search for).
Definition at line 188 of file sac.h.
double sample_consensus::SAC::threshold_ |
|
protected |
Distance to model threshold.
Definition at line 200 of file sac.h.
The documentation for this class was generated from the following files: