40 #include <pcl/cuda/sample_consensus/sac_model.h>
41 #include <pcl/cuda/point_cloud.h>
49 template <
template <
typename>
class Storage>
68 using Ptr = shared_ptr<SampleConsensus>;
69 using ConstPtr = shared_ptr<const SampleConsensus>;
int getMaxIterations()
Get the maximum number of iterations, as set by the user.
SampleConsensus(const SampleConsensusModelPtr &model, float threshold)
Constructor for base SAC.
virtual ~SampleConsensus()
Destructor for base SAC.
virtual bool computeModel(int debug_verbosity_level=0)=0
Compute the actual model.
void getModelCoefficients(Coefficients &model_coefficients)
Return the model coefficients of the best model found so far.
shared_ptr< SampleConsensusModel > Ptr
typename Storage< float >::type Coefficients
float getProbability()
Obtain the probability of choosing at least one sample free from outliers, as set by the user...
void setDistanceThreshold(float threshold)
Set the distance to model threshold.
shared_ptr< Indices > IndicesPtr
float probability_
Desired probability of choosing at least one sample free from outliers.
shared_ptr< const Coefficients > CoefficientsConstPtr
SampleConsensus(const SampleConsensusModelPtr &model)
Constructor for base SAC.
IndicesPtr getInliers()
Return the best set of inliers found so far for this model.
Coefficients model_coefficients_
The coefficients of our model computed directly from the model found.
shared_ptr< SampleConsensus > Ptr
shared_ptr< typename Storage< int >::type > IndicesPtr
int iterations_
Total number of internal loop iterations that we've done so far.
void setMaxIterations(int max_iterations)
Set the maximum number of iterations.
void getModel(Indices &model)
Return the best model found so far.
shared_ptr< const SampleConsensus > ConstPtr
void setProbability(float probability)
Set the desired probability of choosing at least one sample free from outliers.
typename Storage< int >::type Indices
shared_ptr< const typename Storage< int >::type > IndicesConstPtr
IndicesPtr inliers_
The indices of the points that were chosen as inliers after the last call.
float getDistanceThreshold()
Get the distance to model threshold, as set by the user.
float threshold_
Distance to model threshold.
int max_iterations_
Maximum number of iterations before giving up.
IndicesPtr inliers_stencil_
SampleConsensusModelPtr sac_model_
The underlying data model used (what is it that we attempt to search for).
typename Storage< float4 >::type Hypotheses
shared_ptr< Coefficients > CoefficientsPtr
IndicesPtr getInliersStencil()
Indices model_
The model found after the last computeModel () as point cloud indices.