40#include <pcl/cuda/sample_consensus/sac.h>
41#include <pcl/cuda/sample_consensus/sac_model.h>
54 template <
template <
typename>
class Storage>
81 min_coverage_percent_ (0.9),
83 iterations_per_batch_ (1000)
113 min_coverage_percent_ = percent;
124 max_batches_ = max_batches_;
135 iterations_per_batch_ = iterations_per_batch;
138 inline std::vector<IndicesPtr>
141 inline std::vector<int>
146 inline std::vector<float4>
149 return all_model_coefficients_;
154 inline std::vector<float3>
157 return all_model_centroids_;
161 float min_coverage_percent_;
162 unsigned int max_batches_;
163 unsigned int iterations_per_batch_;
166 std::vector<float3> all_model_centroids_;
169 std::vector<float4> all_model_coefficients_;
171 std::vector<IndicesPtr> all_inliers_;
172 std::vector<int> all_inlier_counts_;
RandomSampleConsensus represents an implementation of the RANSAC (RAndom SAmple Consensus) algorithm,...
void setMaximumBatches(int max_batches)
Sets the maximum number of batches that should be processed.
std::vector< int > getAllInlierCounts()
MultiRandomSampleConsensus(const SampleConsensusModelPtr &model, double threshold)
RANSAC (RAndom SAmple Consensus) main constructor.
std::vector< float3 > getAllModelCentroids()
Return the model coefficients of the best model found so far.
void setMinimumCoverage(float percent)
how much (in percent) of the point cloud should be covered? If it is not possible to find enough plan...
void setIerationsPerBatch(int iterations_per_batch)
Sets the maximum number of batches that should be processed.
std::vector< float4 > getAllModelCoefficients()
Return the model coefficients of the best model found so far.
bool computeModel(int debug_verbosity_level=0)
Compute the actual model and find the inliers.
MultiRandomSampleConsensus(const SampleConsensusModelPtr &model)
RANSAC (RAndom SAmple Consensus) main constructor.
std::vector< IndicesPtr > getAllInliers()
IndicesPtr inliers_stencil_
Indices model_
The model found after the last computeModel () as point cloud indices.
float probability_
Desired probability of choosing at least one sample free from outliers.
float threshold_
Distance to model threshold.
int max_iterations_
Maximum number of iterations before giving up.
Coefficients model_coefficients_
The coefficients of our model computed directly from the model found.
IndicesPtr inliers_
The indices of the points that were chosen as inliers after the last call.
SampleConsensusModelPtr sac_model_
The underlying data model used (what is it that we attempt to search for).
int iterations_
Total number of internal loop iterations that we've done so far.
typename Storage< float4 >::type Hypotheses
shared_ptr< const typename Storage< int >::type > IndicesConstPtr
shared_ptr< typename Storage< int >::type > IndicesPtr
typename Storage< float >::type Coefficients
typename Storage< int >::type Indices
shared_ptr< SampleConsensusModel > Ptr