42 #include <pcl/cuda/sample_consensus/sac_model.h>
43 #include <thrust/random.h>
59 template <
typename Tuple> __inline__ __host__ __device__
bool
64 template <
template <
typename>
class Storage>
69 const typename Storage<PointXYZRGB>::type &
input_;
75 __inline__ __host__ __device__
int
89 template <
typename Tuple> __inline__ __host__ __device__
int
103 __inline__ __host__ __device__
int
118 template <
typename Tuple> __inline__ __host__ __device__
int
133 __inline__ __host__ __device__
int
148 template <
typename Tuple>
149 __inline__ __host__ __device__
int
156 template <
template <
typename>
class Storage>
179 using Ptr = shared_ptr<SampleConsensusModel1PointPlane>;
180 using ConstPtr = shared_ptr<const SampleConsensusModel1PointPlane>;
242 template <
template <
typename>
class Storage>
260 __inline__ __host__ __device__ float4
266 template <
template <
typename>
class Storage>
281 thrust::default_random_engine
rng;
289 __inline__ __host__ __device__ thrust::tuple<int,float4>
297 __inline__ __host__ __device__
303 __inline__ __host__ __device__
306 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.
SampleConsensusModel1PointPlane defines a model for 3D plane segmentation.
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 countWithinDistance(const Coefficients &model_coefficients, float threshold)
int countWithinDistance(const Hypotheses &h, int idx, float threshold)
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.
SampleConsensusModel1PointPlane(const PointCloudConstPtr &cloud)
Constructor for base SampleConsensusModel1PointPlane.
int selectWithinDistance(Hypotheses &h, int idx, float threshold, IndicesPtr &inliers_stencil, float3 ¢roid)
bool generateModelHypotheses(Hypotheses &h, int max_iterations)
int selectWithinDistance(const Hypotheses &h, int idx, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)
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
Check if a certain tuple is a point inlier.
CheckPlanarInlier(float4 coeff, float thresh)
__inline__ __host__ __device__ int operator()(const Tuple &t)
Check if a certain tuple is a point inlier.
__inline__ __host__ __device__ int operator()(const PointXYZRGB &pt, const int &idx)
CheckPlanarInlierIndices(float4 coeff, float thresh)
Check if a certain tuple is a point inlier.
CheckPlanarInlierKinectIndices(float4 coeff, float thresh, float angle_thresh)
__inline__ __host__ __device__ int operator()(const PointXYZRGB &pt, const int &idx)
Check if a certain tuple is a point inlier.
__inline__ __host__ __device__ int operator()(const Tuple &t, const int &idx)
CheckPlanarInlierKinectNormalIndices(float4 coeff, float thresh, float angle_thresh)
Check if a certain tuple is a point inlier.
__inline__ __host__ __device__ int operator()(const Tuple &pt, const int &idx)
CheckPlanarInlierNormalIndices(float4 coeff, float thresh, float angle_thresh)
Check if a certain tuple is a point inlier.
__inline__ __host__ __device__ bool operator()(const Tuple &t)
CountPlanarInlier(float4 coeff, float thresh)
Check if a certain tuple is a point inlier.
typename PointCloud::ConstPtr PointCloudConstPtr
typename SampleConsensusModel< Storage >::PointCloud PointCloud
Create1PointPlaneHypothesis(const PointXYZRGB *_input, const int *_indices, int _nr_indices, float bad)
__inline__ __host__ __device__ float4 operator()(int t)
const PointXYZRGB * input
typename SampleConsensusModel< Storage >::IndicesConstPtr IndicesConstPtr
typename SampleConsensusModel< Storage >::Indices Indices
Check if a certain tuple is a point inlier.
Create1PointPlaneSampleHypothesis(const PointXYZRGB *_input, const float4 *normals, const int *_indices, int width, int height, int _nr_indices, float bad)
const PointXYZRGB * input
__inline__ __host__ __device__ thrust::tuple< int, float4 > operator()(int t)
typename SampleConsensusModel< Storage >::Indices Indices
typename SampleConsensusModel< Storage >::IndicesConstPtr IndicesConstPtr
typename SampleConsensusModel< Storage >::PointCloud PointCloud
thrust::default_random_engine rng
typename PointCloud::ConstPtr PointCloudConstPtr
Check if a certain tuple is a point inlier.
const Storage< PointXYZRGB >::type & input_
__inline__ __host__ __device__ int operator()(const int &idx)
NewCheckPlanarInlier(float4 coeff, float thresh, const typename Storage< PointXYZRGB >::type &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