40 #include <pcl/cuda/sample_consensus/sac_model.h>
42 #include <thrust/random.h>
49 struct CountPlanarInlier
58 template <
typename Tuple> __inline__ __host__ __device__
bool
72 template <
typename Tuple> __inline__ __host__ __device__
int
79 template <
template <
typename>
class Storage>
99 using Ptr = shared_ptr<SampleConsensusModelPlane>;
100 using ConstPtr = shared_ptr<const SampleConsensusModelPlane>;
225 template <
template <
typename>
class Storage>
245 __inline__ __host__ __device__ float4
254 __inline__ __host__ __device__
260 __inline__ __host__ __device__
263 thrust::default_random_engine rng(
m_seed);
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
PointCloudAOS represents an AOS (Array of Structs) PointCloud implementation for CUDA processing.
SampleConsensusModel represents the base model class.
typename Storage< float4 >::type Hypotheses
typename PointCloud::Ptr PointCloudPtr
shared_ptr< const SampleConsensusModel > ConstPtr
shared_ptr< const typename Storage< int >::type > IndicesConstPtr
shared_ptr< typename Storage< int >::type > IndicesPtr
typename PointCloud::ConstPtr PointCloudConstPtr
typename Storage< float >::type Coefficients
typename Storage< int >::type Indices
shared_ptr< SampleConsensusModel > Ptr
typename Storage< int >::type Samples
SampleConsensusModelPlane defines a model for 3D plane segmentation.
int countWithinDistance(const Coefficients &model_coefficients, float threshold)
virtual bool generateModelHypotheses(Hypotheses &h, Samples &s, int max_iterations)
int selectWithinDistance(const Coefficients &model_coefficients, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)
Select all the points which respect the given model coefficients as inliers.
static const int MAX_ITERATIONS_COLLINEAR
void getSamples(int &iterations, Indices &samples)
Get 3 random non-collinear points as data samples and return them as point indices.
bool computeModelCoefficients(const Indices &samples, Coefficients &model_coefficients)
Check whether the given index samples can form a valid plane model, compute the model coefficients fr...
int selectWithinDistance(const Hypotheses &h, int idx, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)
int countWithinDistance(const Hypotheses &h, int idx, float threshold)
SampleConsensusModelPlane(const PointCloudConstPtr &cloud)
Constructor for base SampleConsensusModelPlane.
int selectWithinDistance(Hypotheses &h, int idx, float threshold, IndicesPtr &inliers_stencil, float3 ¢roid)
bool generateModelHypotheses(Hypotheses &h, int max_iterations)
Check if a certain tuple is a point inlier.
CheckPlanarInlier(float4 coeff, float thresh)
__inline__ __host__ __device__ int operator()(const Tuple &t)
__inline__ __host__ __device__ bool operator()(const Tuple &t)
CountPlanarInlier(float4 coeff, float thresh)
Check if a certain tuple is a point inlier.
typename SampleConsensusModel< Storage >::IndicesPtr IndicesPtr
typename PointCloud::ConstPtr PointCloudConstPtr
typename SampleConsensusModel< Storage >::Indices Indices
typename SampleConsensusModel< Storage >::PointCloud PointCloud
CreatePlaneHypothesis(const PointXYZRGB *_input, const int *_indices, int _nr_indices, float bad)
__inline__ __host__ __device__ float4 operator()(int t)
typename SampleConsensusModel< Storage >::IndicesConstPtr IndicesConstPtr
const PointXYZRGB * input
Default point xyz-rgb structure.
__inline__ __host__ __device__ parallel_random_generator(unsigned int seed)
__inline__ __host__ __device__ unsigned int operator()(const unsigned int n) const