38 #ifndef PCL_CUDA_SAMPLE_CONSENSUS_MODEL_PLANE_H_ 39 #define PCL_CUDA_SAMPLE_CONSENSUS_MODEL_PLANE_H_ 41 #include <pcl/cuda/sample_consensus/sac_model.h> 43 #include <thrust/random.h> 50 struct CountPlanarInlier
56 coefficients(coeff), threshold(thresh)
59 template <
typename Tuple> __inline__ __host__ __device__
bool 70 coefficients(coeff), threshold(thresh)
73 template <
typename Tuple> __inline__ __host__ __device__
int 80 template <
template <
typename>
class Storage>
100 typedef boost::shared_ptr<SampleConsensusModelPlane>
Ptr;
119 getSamples (
int &iterations, Indices &samples);
128 computeModelCoefficients (
const Indices &samples, Coefficients &model_coefficients);
131 generateModelHypotheses (Hypotheses &h,
int max_iterations);
137 return generateModelHypotheses (h, max_iterations);
156 selectWithinDistance (
const Coefficients &model_coefficients,
157 float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil);
159 selectWithinDistance (
const Hypotheses &h,
int idx,
161 IndicesPtr &inliers, IndicesPtr &inliers_stencil);
163 selectWithinDistance (Hypotheses &h,
int idx,
165 IndicesPtr &inliers_stencil,
169 countWithinDistance (
const Coefficients &model_coefficients,
float threshold);
172 countWithinDistance (
const Hypotheses &h,
int idx,
float threshold);
221 const static int MAX_ITERATIONS_COLLINEAR = 1000;
225 template <
template <
typename>
class Storage>
241 input(_input), indices(_indices), nr_indices(_nr_indices), bad_value(bad)
245 __inline__ __host__ __device__ float4
254 __inline__ __host__ __device__
260 __inline__ __host__ __device__
263 thrust::default_random_engine rng(m_seed);
275 #endif //#ifndef PCL_CUDA_SAMPLE_CONSENSUS_MODEL_PLANE_H_ SampleConsensusModel< Storage >::IndicesPtr IndicesPtr
SampleConsensusModelPlane defines a model for 3D plane segmentation.
CheckPlanarInlier(float4 coeff, float thresh)
SampleConsensusModel represents the base model class.
boost::shared_ptr< typename Storage< int >::type > IndicesPtr
SampleConsensusModel< Storage >::Indices Indices
PointCloudAOS represents an AOS (Array of Structs) PointCloud implementation for CUDA processing...
Storage< int >::type Samples
CreatePlaneHypothesis(const PointXYZRGB *_input, const int *_indices, int _nr_indices, float bad)
boost::shared_ptr< const typename Storage< int >::type > IndicesConstPtr
Storage< float >::type Coefficients
Storage< int >::type Indices
SampleConsensusModel< Storage >::PointCloud PointCloud
SampleConsensusModel< Storage >::Indices Indices
SampleConsensusModel< Storage >::IndicesConstPtr IndicesConstPtr
PointCloud::Ptr PointCloudPtr
SampleConsensusModel< Storage >::Coefficients Coefficients
virtual bool generateModelHypotheses(Hypotheses &h, Samples &s, int max_iterations)
Storage< float4 >::type Hypotheses
const PointXYZRGB * input
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< PointCloudAOS< Storage > > Ptr
SampleConsensusModel< Storage >::PointCloud PointCloud
PointCloud::ConstPtr PointCloudConstPtr
__inline__ __host__ __device__ parallel_random_generator(unsigned int seed)
SampleConsensusModel< Storage >::Samples Samples
SampleConsensusModel< Storage >::Hypotheses Hypotheses
Check if a certain tuple is a point inlier.
boost::shared_ptr< SampleConsensusModelPlane > Ptr
__inline__ __host__ __device__ bool operator()(const Tuple &t)
boost::shared_ptr< const PointCloudAOS< Storage > > ConstPtr
Default point xyz-rgb structure.
__inline__ __host__ __device__ unsigned int operator()(const unsigned int n) const
SampleConsensusModel< Storage >::IndicesPtr IndicesPtr
CountPlanarInlier(float4 coeff, float thresh)
Check if a certain tuple is a point inlier.
SampleConsensusModel< Storage >::IndicesConstPtr IndicesConstPtr