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.
MultiRandomSampleConsensus(const SampleConsensusModelPtr &model, double threshold)
RANSAC (RAndom SAmple Consensus) main constructor.
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< int > getAllInlierCounts()
std::vector< IndicesPtr > getAllInliers()
std::vector< float4 > getAllModelCoefficients()
Return the model coefficients of the best model found so far.
std::vector< float3 > getAllModelCentroids()
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.
int max_iterations_
Maximum number of iterations before giving up.
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