Point Cloud Library (PCL)
1.11.1-dev
|
41 #include <thrust/sequence.h>
42 #include <thrust/count.h>
43 #include <thrust/remove.h>
44 #include <pcl/cuda/point_cloud.h>
45 #include <thrust/random/linear_congruential_engine.h>
47 #include <pcl/pcl_exports.h>
59 template <
typename Tuple> __inline__ __host__ __device__
int
66 __inline__ __host__ __device__
bool
72 __inline__ __host__ __device__
bool
76 return (isnan (pt.
x) | isnan (pt.
y) | isnan (pt.
z)) == 1;
78 return (std::isnan (pt.
x) | std::isnan (pt.
y) | std::isnan (pt.
z)) == 1;
86 template <
template <
typename>
class Storage>
94 using Ptr = shared_ptr<SampleConsensusModel>;
95 using ConstPtr = shared_ptr<const SampleConsensusModel>;
97 using Indices =
typename Storage<int>::type;
98 using IndicesPtr = shared_ptr<typename Storage<int>::type>;
171 {
return ((*inliers_stencil)[samples[i]] != -1);};
220 float3 ¢roid) = 0;
267 inline PointCloudConstPtr
334 inline shared_ptr<typename Storage<float4>::type>
350 shared_ptr<typename Storage<float4>::type>
normals_;
shared_ptr< Indices > IndicesPtr
PointCloudAOS represents an AOS (Array of Structs) PointCloud implementation for CUDA processing.
virtual int selectWithinDistance(const Coefficients &model_coefficients, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)=0
Select all the points which respect the given model coefficients as inliers.
IndicesPtr indices_stencil_
A pointer to the vector of point indices (stencil) to use.
virtual ~SampleConsensusModel()
Destructor for base SampleConsensusModel.
PointCloudConstPtr getInputCloud() const
Get a pointer to the input point cloud dataset.
shared_ptr< PointCloudAOS< Storage > > Ptr
void getRadiusLimits(float &min_radius, float &max_radius)
Get the minimum and maximum allowable radius limits for the model as set by the user.
shared_ptr< const SampleConsensusModel > ConstPtr
IndicesPtr getIndices() const
Get a pointer to the vector of indices used.
SampleConsensusModel(const PointCloudConstPtr &cloud)
Constructor for base SampleConsensusModel.
typename Storage< float4 >::type Hypotheses
shared_ptr< SampleConsensusModel > Ptr
typename PointCloud::Ptr PointCloudPtr
Default point xyz-rgb structure.
virtual bool isSampleInlier(IndicesPtr &inliers_stencil, Samples &samples, unsigned int &i)
shared_ptr< const typename Storage< int >::type > IndicesConstPtr
shared_ptr< Coefficients > CoefficientsPtr
typename PointCloud::ConstPtr PointCloudConstPtr
shared_ptr< typename Storage< float4 >::type > getNormals()
shared_ptr< const PointCloudAOS< Storage > > ConstPtr
Check if a certain tuple is a point inlier.
thrust::minstd_rand rngl_
Linear-Congruent random number generator engine.
void setRadiusLimits(float min_radius, float max_radius)
Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate...
virtual int countWithinDistance(const Coefficients &model_coefficients, float threshold)=0
shared_ptr< typename Storage< float4 >::type > normals_
virtual void getSamples(int &iterations, Indices &samples)=0
Get a set of random data samples and return them as point indices.
typename Storage< float >::type Coefficients
typename Storage< int >::type Samples
PointCloudConstPtr input_
A boost shared pointer to the point cloud data array.
__inline__ __host__ __device__ bool operator()(int x)
IndicesAllocator<> Indices
Type used for indices in PCL.
unsigned int nr_indices_in_stencil_
number of indices left in indices_stencil_
typename Storage< int >::type Indices
shared_ptr< const Coefficients > CoefficientsConstPtr
SampleConsensusModel represents the base model class.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
shared_ptr< typename Storage< int >::type > IndicesPtr
__inline__ __host__ __device__ bool operator()(PointXYZRGB pt)
virtual bool generateModelHypotheses(Hypotheses &h, int max_iterations)=0
virtual bool computeModelCoefficients(const Indices &samples, Coefficients &model_coefficients)=0
Check whether the given index samples can form a valid model, compute the model coefficients from the...
int deleteIndices(const IndicesPtr &indices_stencil)
Check if a certain tuple is a point inlier.
float radius_min_
The minimum and maximum radius limits for the model.
void setNormals(shared_ptr< typename Storage< float4 >::type > normals)
__inline__ __host__ __device__ int operator()(const Tuple &t)