#include <sac_model.h>

Public Member Functions | |
| virtual bool | computeModelCoefficients (const std::vector< int > &samples)=0 |
| Check whether the given index samples can form a valid model, compute the model coefficients from these samples and store them internally in model_coefficients_. Pure virtual. More... | |
| virtual bool | doSamplesVerifyModel (const std::set< int > &indices, double threshold)=0 |
| Verify whether a subset of indices verifies the internal model coefficients. Pure virtual. More... | |
| std::vector< int > | getBestInliers () |
| Return the best set of inliers found so far for this model. More... | |
| std::vector< int > | getBestModel () |
| Return the best model found so far. More... | |
| PointCloud * | getCloud () |
| Return a pointer to the point cloud data. More... | |
| virtual void | getDistancesToModel (const std::vector< double > &model_coefficients, std::vector< double > &distances)=0 |
| Compute all distances from the cloud data to a given model. Pure virtual. More... | |
| std::vector< int > * | getIndices () |
| Return a pointer to the point cloud data indices. More... | |
| std::vector< double > | getModelCoefficients () |
| Return the model coefficients of the best model found so far. More... | |
| virtual int | getModelType ()=0 |
| Return an unique id for each type of model employed. More... | |
| virtual void | getSamples (int &iterations, std::vector< int > &samples)=0 |
| Get a set of random data samples and return them as point indices. Pure virtual. More... | |
| virtual void | projectPoints (const std::vector< int > &inliers, const std::vector< double > &model_coefficients, PointCloud &projected_points)=0 |
| Create a new point cloud with inliers projected onto the model. Pure virtual. More... | |
| virtual void | projectPointsInPlace (const std::vector< int > &inliers, const std::vector< double > &model_coefficients)=0 |
| Project inliers (in place) onto the given model. Pure virtual. More... | |
| virtual void | refitModel (const std::vector< int > &inliers, std::vector< double > &refit_coefficients)=0 |
| Recompute the model coefficients using the given inlier set and return them to the user. Pure virtual. More... | |
| virtual int | removeInliers () |
| Remove the inliers found from the initial set of given point indices. More... | |
| SACModel () | |
| Constructor for base SACModel. More... | |
| SACModel (PointCloud cloud) | |
| virtual void | selectWithinDistance (const std::vector< double > &model_coefficients, double threshold, std::vector< int > &inliers)=0 |
| Select all the points which respect the given model coefficients as inliers. Pure virtual. More... | |
| void | setBestInliers (const std::vector< int > &best_inliers) |
| Set the best set of inliers. Used by SAC methods. Do not call this except if you know what you're doing. More... | |
| void | setBestModel (std::vector< int > best_model) |
| Set the best model. Used by SAC methods. Do not call this except if you know what you're doing. More... | |
| void | setDataIndices (std::vector< int > indices) |
| Set the indices. More... | |
| void | setDataSet (PointCloud *cloud) |
| Set the dataset. More... | |
| void | setDataSet (PointCloud *cloud, std::vector< int > indices) |
| Set the dataset and indices. More... | |
| virtual bool | testModelCoefficients (const std::vector< double > &model_coefficients)=0 |
| Test whether the given model coefficients are valid given the input point cloud data. Pure virtual. More... | |
| virtual | ~SACModel () |
| Destructor for base SACModel. More... | |
Protected Attributes | |
| std::vector< int > | best_inliers_ |
| The indices of the points that were chosen as inliers after the last computeModel () call. More... | |
| std::vector< int > | best_model_ |
| The model found after the last computeModel () as pointcloud indices. More... | |
| PointCloud * | cloud_ |
| Holds a pointer to the point cloud data array, since we don't want to copy the whole thing here. More... | |
| std::vector< int > | indices_ |
| The list of internal point indices used. More... | |
| std::vector< double > | model_coefficients_ |
| The coefficients of our model computed directly from the best samples found. More... | |
Definition at line 45 of file sac_model.h.
|
inline |
Constructor for base SACModel.
Definition at line 50 of file sac_model.h.
|
inline |
Definition at line 51 of file sac_model.h.
|
inlinevirtual |
Destructor for base SACModel.
Definition at line 55 of file sac_model.h.
|
pure virtual |
Check whether the given index samples can form a valid model, compute the model coefficients from these samples and store them internally in model_coefficients_. Pure virtual.
| samples | the point indices found as possible good candidates for creating a valid model |
Implemented in sample_consensus::SACModelLine.
|
pure virtual |
Verify whether a subset of indices verifies the internal model coefficients. Pure virtual.
| indices | the data indices that need to be tested against the model |
| threshold | a maximum admissible distance threshold for determining the inliers from the outliers |
Implemented in sample_consensus::SACModelLine.
|
inline |
Return the best set of inliers found so far for this model.
Definition at line 167 of file sac_model.h.
|
inline |
Return the best model found so far.
Definition at line 176 of file sac_model.h.
|
inline |
Return a pointer to the point cloud data.
Definition at line 183 of file sac_model.h.
|
pure virtual |
Compute all distances from the cloud data to a given model. Pure virtual.
| model_coefficients | the coefficients of a model that we need to compute distances to |
| distances | the resultant estimated distances |
Implemented in sample_consensus::SACModelLine.
|
inline |
Return a pointer to the point cloud data indices.
Definition at line 186 of file sac_model.h.
|
inline |
Return the model coefficients of the best model found so far.
Definition at line 180 of file sac_model.h.
|
pure virtual |
Return an unique id for each type of model employed.
Implemented in sample_consensus::SACModelLine.
|
pure virtual |
Get a set of random data samples and return them as point indices. Pure virtual.
| iterations | the internal number of iterations used by SAC methods |
| samples | the resultant model samples |
Implemented in sample_consensus::SACModelLine.
|
pure virtual |
Create a new point cloud with inliers projected onto the model. Pure virtual.
| inliers | the data inliers that we want to project on the model |
| model_coefficients | the coefficients of a model |
| projected_points | the resultant projected points |
Implemented in sample_consensus::SACModelLine.
|
pure virtual |
Project inliers (in place) onto the given model. Pure virtual.
| inliers | the data inliers that we want to project on the model |
| model_coefficients | the coefficients of a model |
Implemented in sample_consensus::SACModelLine.
|
pure virtual |
Recompute the model coefficients using the given inlier set and return them to the user. Pure virtual.
| inliers | the data inliers found as supporting the model |
| refit_coefficients | the resultant recomputed coefficients after non-linear optimization |
Implemented in sample_consensus::SACModelLine.
|
virtual |
Remove the inliers found from the initial set of given point indices.
Definition at line 41 of file sac_model.cpp.
|
pure virtual |
Select all the points which respect the given model coefficients as inliers. Pure virtual.
| model_coefficients | the coefficients of a model that we need to compute distances to |
| threshold | a maximum admissible distance threshold for determining the inliers from the outliers |
| inliers | the resultant model inliers |
Implemented in sample_consensus::SACModelLine.
|
inline |
Set the best set of inliers. Used by SAC methods. Do not call this except if you know what you're doing.
| best_inliers | the set of inliers for the best model |
Definition at line 163 of file sac_model.h.
|
inline |
Set the best model. Used by SAC methods. Do not call this except if you know what you're doing.
| best_model | the best model found so far |
Definition at line 172 of file sac_model.h.
|
inline |
Set the indices.
| indices | the point indices used |
Definition at line 150 of file sac_model.h.
|
inline |
Set the dataset.
| cloud | the data set to be used |
Definition at line 129 of file sac_model.h.
|
inline |
Set the dataset and indices.
| cloud | the data set to be used |
| indices | the point indices used |
Definition at line 142 of file sac_model.h.
|
pure virtual |
Test whether the given model coefficients are valid given the input point cloud data. Pure virtual.
| model_coefficients | the model coefficients that need to be tested |
Implemented in sample_consensus::SACModelLine.
|
protected |
The indices of the points that were chosen as inliers after the last computeModel () call.
Definition at line 202 of file sac_model.h.
|
protected |
The model found after the last computeModel () as pointcloud indices.
Definition at line 200 of file sac_model.h.
|
protected |
Holds a pointer to the point cloud data array, since we don't want to copy the whole thing here.
Definition at line 191 of file sac_model.h.
|
protected |
The list of internal point indices used.
Definition at line 194 of file sac_model.h.
|
protected |
The coefficients of our model computed directly from the best samples found.
Definition at line 197 of file sac_model.h.