Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
pcl::MovingLeastSquaresOMP< PointInT, PointOutT > Class Template Reference

MovingLeastSquaresOMP represent an OpenMP implementation of the MLS (Moving Least Squares) algorithm for data smoothing and improved normal estimation. More...

#include <pcl/surface/mls_omp.h>

Inheritance diagram for pcl::MovingLeastSquaresOMP< PointInT, PointOutT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::MovingLeastSquaresOMP< PointInT, PointOutT >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  UpsamplingMethod { NONE, SAMPLE_LOCAL_PLANE, RANDOM_UNIFORM_DENSITY, VOXEL_GRID_DILATION }
typedef pcl::search::Search
< PointInT > 
KdTree
typedef pcl::search::Search
< PointInT >::Ptr 
KdTreePtr
typedef pcl::PointCloud
< pcl::Normal >::Ptr 
NormalCloudPtr
typedef PointCloudOut::Ptr PointCloudOutPtr
typedef PointCloudOut::ConstPtr PointCloudOutConstPtr
typedef PointCloudIn::Ptr PointCloudInPtr
typedef PointCloudIn::ConstPtr PointCloudInConstPtr
typedef boost::function< int(int,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethod
typedef pcl::PointCloud< PointInT > PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 MovingLeastSquaresOMP ()
 Empty constructor.
 MovingLeastSquaresOMP (unsigned int nr_threads)
 Initialize the scheduler and set the number of threads to use.
void setNumberOfThreads (unsigned int nr_threads)
 Initialize the scheduler and set the number of threads to use.
void setComputeNormals (bool compute_normals)
 Set whether the algorithm should also store the normals computed.
void setSearchMethod (const KdTreePtr &tree)
 Provide a pointer to the search object.
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used.
void setPolynomialOrder (int order)
 Set the order of the polynomial to be fit.
int getPolynomialOrder ()
 Get the order of the polynomial to be fit.
void setPolynomialFit (bool polynomial_fit)
 Sets whether the surface and normal are approximated using a polynomial, or only via tangent estimation.
bool getPolynomialFit ()
 Get the polynomial_fit value (true if the surface and normal are approximated using a polynomial).
void setSearchRadius (double radius)
 Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting.
double getSearchRadius ()
 Get the sphere radius used for determining the k-nearest neighbors.
void setSqrGaussParam (double sqr_gauss_param)
 Set the parameter used for distance based weighting of neighbors (the square of the search radius works best in general).
double getSqrGaussParam () const
 Get the parameter for distance based weighting of neighbors.
void setUpsamplingMethod (UpsamplingMethod method)
 Set the upsampling method to be used.
void setUpsamplingRadius (double radius)
 Set the radius of the circle in the local point plane that will be sampled.
double getUpsamplingRadius ()
 Get the radius of the circle in the local point plane that will be sampled.
void setUpsamplingStepSize (double step_size)
 Set the step size for the local plane sampling.
double getUpsamplingStepSize ()
 Get the step size for the local plane sampling.
void setPointDensity (int desired_num_points_in_radius)
 Set the parameter that specifies the desired number of points within the search radius.
int getPointDensity ()
 Get the parameter that specifies the desired number of points within the search radius.
void setDilationVoxelSize (float voxel_size)
 Set the voxel size for the voxel grid.
float getDilationVoxelSize ()
 Get the voxel size for the voxel grid.
void setDilationIterations (int iterations)
 Set the number of dilation steps of the voxel grid.
int getDilationIterations ()
 Get the number of dilation steps of the voxel grid.
void process (PointCloudOut &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
virtual void process (pcl::PointCloud< PointOutT > &output)
 Process the input cloud and store the results.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointInT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

template<typename PointInT, typename PointOutT>
class pcl::MovingLeastSquaresOMP< PointInT, PointOutT >

MovingLeastSquaresOMP represent an OpenMP implementation of the MLS (Moving Least Squares) algorithm for data smoothing and improved normal estimation.

Author:
Radu B. Rusu

Definition at line 53 of file mls_omp.h.


Member Typedef Documentation

template<typename PointInT, typename PointOutT>
typedef pcl::search::Search<PointInT> pcl::MovingLeastSquares< PointInT, PointOutT >::KdTree [inherited]

Definition at line 75 of file mls.h.

template<typename PointInT, typename PointOutT>
typedef pcl::search::Search<PointInT>::Ptr pcl::MovingLeastSquares< PointInT, PointOutT >::KdTreePtr [inherited]

Definition at line 76 of file mls.h.

template<typename PointInT, typename PointOutT>
typedef pcl::PointCloud<pcl::Normal>::Ptr pcl::MovingLeastSquares< PointInT, PointOutT >::NormalCloudPtr [inherited]

Definition at line 78 of file mls.h.

typedef pcl::PointCloud<PointInT > pcl::PCLBase< PointInT >::PointCloud [inherited]

Definition at line 74 of file pcl_base.h.

typedef PointCloud::ConstPtr pcl::PCLBase< PointInT >::PointCloudConstPtr [inherited]
template<typename PointInT, typename PointOutT>
typedef PointCloudIn::ConstPtr pcl::MovingLeastSquares< PointInT, PointOutT >::PointCloudInConstPtr [inherited]

Definition at line 86 of file mls.h.

template<typename PointInT, typename PointOutT>
typedef PointCloudIn::Ptr pcl::MovingLeastSquares< PointInT, PointOutT >::PointCloudInPtr [inherited]

Definition at line 85 of file mls.h.

template<typename PointInT, typename PointOutT>
typedef PointCloudOut::ConstPtr pcl::MovingLeastSquares< PointInT, PointOutT >::PointCloudOutConstPtr [inherited]

Definition at line 82 of file mls.h.

template<typename PointInT, typename PointOutT>
typedef PointCloudOut::Ptr pcl::MovingLeastSquares< PointInT, PointOutT >::PointCloudOutPtr [inherited]

Definition at line 81 of file mls.h.

typedef PointCloud::Ptr pcl::PCLBase< PointInT >::PointCloudPtr [inherited]

Reimplemented in pcl::OrganizedFastMesh< PointInT >.

Definition at line 75 of file pcl_base.h.

typedef PointIndices::ConstPtr pcl::PCLBase< PointInT >::PointIndicesConstPtr [inherited]

Definition at line 79 of file pcl_base.h.

typedef PointIndices::Ptr pcl::PCLBase< PointInT >::PointIndicesPtr [inherited]

Definition at line 78 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
typedef boost::function<int (int, double, std::vector<int> &, std::vector<float> &)> pcl::MovingLeastSquares< PointInT, PointOutT >::SearchMethod [inherited]

Definition at line 88 of file mls.h.


Member Enumeration Documentation

template<typename PointInT, typename PointOutT>
enum pcl::MovingLeastSquares::UpsamplingMethod [inherited]
Enumerator:
NONE 
SAMPLE_LOCAL_PLANE 
RANDOM_UNIFORM_DENSITY 
VOXEL_GRID_DILATION 

Definition at line 90 of file mls.h.


Constructor & Destructor Documentation

template<typename PointInT , typename PointOutT >
pcl::MovingLeastSquaresOMP< PointInT, PointOutT >::MovingLeastSquaresOMP ( ) [inline]

Empty constructor.

Definition at line 79 of file mls_omp.h.

template<typename PointInT , typename PointOutT >
pcl::MovingLeastSquaresOMP< PointInT, PointOutT >::MovingLeastSquaresOMP ( unsigned int  nr_threads) [inline]

Initialize the scheduler and set the number of threads to use.

Parameters:
nr_threadsthe number of hardware threads to use (-1 sets the value back to automatic)

Definition at line 85 of file mls_omp.h.


Member Function Documentation

template<typename PointInT, typename PointOutT>
int pcl::MovingLeastSquares< PointInT, PointOutT >::getDilationIterations ( ) [inline, inherited]

Get the number of dilation steps of the voxel grid.

Note:
Used only in the VOXEL_GRID_DILATION upsampling method

Definition at line 265 of file mls.h.

template<typename PointInT, typename PointOutT>
float pcl::MovingLeastSquares< PointInT, PointOutT >::getDilationVoxelSize ( ) [inline, inherited]

Get the voxel size for the voxel grid.

Note:
Used only in the VOXEL_GRID_DILATION upsampling method

Definition at line 252 of file mls.h.

IndicesPtr const pcl::PCLBase< PointInT >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase< PointInT >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
int pcl::MovingLeastSquares< PointInT, PointOutT >::getPointDensity ( ) [inline, inherited]

Get the parameter that specifies the desired number of points within the search radius.

Note:
Used only in the case of RANDOM_UNIFORM_DENSITY upsampling

Definition at line 238 of file mls.h.

template<typename PointInT, typename PointOutT>
bool pcl::MovingLeastSquares< PointInT, PointOutT >::getPolynomialFit ( ) [inline, inherited]

Get the polynomial_fit value (true if the surface and normal are approximated using a polynomial).

Definition at line 154 of file mls.h.

template<typename PointInT, typename PointOutT>
int pcl::MovingLeastSquares< PointInT, PointOutT >::getPolynomialOrder ( ) [inline, inherited]

Get the order of the polynomial to be fit.

Definition at line 144 of file mls.h.

template<typename PointInT, typename PointOutT>
KdTreePtr pcl::MovingLeastSquares< PointInT, PointOutT >::getSearchMethod ( ) [inline, inherited]

Get a pointer to the search method used.

Definition at line 134 of file mls.h.

template<typename PointInT, typename PointOutT>
double pcl::MovingLeastSquares< PointInT, PointOutT >::getSearchRadius ( ) [inline, inherited]

Get the sphere radius used for determining the k-nearest neighbors.

Definition at line 165 of file mls.h.

template<typename PointInT, typename PointOutT>
double pcl::MovingLeastSquares< PointInT, PointOutT >::getSqrGaussParam ( ) const [inline, inherited]

Get the parameter for distance based weighting of neighbors.

Definition at line 176 of file mls.h.

template<typename PointInT, typename PointOutT>
double pcl::MovingLeastSquares< PointInT, PointOutT >::getUpsamplingRadius ( ) [inline, inherited]

Get the radius of the circle in the local point plane that will be sampled.

Note:
Used only in the case of SAMPLE_LOCAL_PLANE upsampling

Definition at line 209 of file mls.h.

template<typename PointInT, typename PointOutT>
double pcl::MovingLeastSquares< PointInT, PointOutT >::getUpsamplingStepSize ( ) [inline, inherited]

Get the step size for the local plane sampling.

Note:
Used only in the case of SAMPLE_LOCAL_PLANE upsampling

Definition at line 223 of file mls.h.

const PointInT & pcl::PCLBase< PointInT >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

template<typename PointInT , typename PointOutT >
void pcl::CloudSurfaceProcessing< PointInT, PointOutT >::process ( pcl::PointCloud< PointOutT > &  output) [virtual, inherited]

Process the input cloud and store the results.

Parameters:
[out]outputthe cloud where the results will be stored

Reimplemented in pcl::BilateralUpsampling< PointInT, PointOutT >.

Definition at line 43 of file processing.hpp.

template<typename PointInT , typename PointOutT >
void pcl::MovingLeastSquares< PointInT, PointOutT >::process ( PointCloudOut output) [inherited]

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters:
[out]outputthe resultant reconstructed surface model

Definition at line 52 of file mls.hpp.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setComputeNormals ( bool  compute_normals) [inline, inherited]

Set whether the algorithm should also store the normals computed.

Note:
This is optional, but need a proper output cloud type

Definition at line 118 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setDilationIterations ( int  iterations) [inline, inherited]

Set the number of dilation steps of the voxel grid.

Note:
Used only in the VOXEL_GRID_DILATION upsampling method
Parameters:
[in]iterationsthe number of dilation iterations

Definition at line 259 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setDilationVoxelSize ( float  voxel_size) [inline, inherited]

Set the voxel size for the voxel grid.

Note:
Used only in the VOXEL_GRID_DILATION upsampling method
Parameters:
[in]voxel_sizethe edge length of a cubic voxel in the voxel grid

Definition at line 245 of file mls.h.

void pcl::PCLBase< PointInT >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

virtual void pcl::PCLBase< PointInT >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 103 of file pcl_base.h.

template<typename PointInT , typename PointOutT >
void pcl::MovingLeastSquaresOMP< PointInT, PointOutT >::setNumberOfThreads ( unsigned int  nr_threads) [inline]

Initialize the scheduler and set the number of threads to use.

Parameters:
nr_threadsthe number of hardware threads to use (-1 sets the value back to automatic)

Definition at line 94 of file mls_omp.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setPointDensity ( int  desired_num_points_in_radius) [inline, inherited]

Set the parameter that specifies the desired number of points within the search radius.

Note:
Used only in the case of RANDOM_UNIFORM_DENSITY upsampling
Parameters:
[in]desired_num_points_in_radiusthe desired number of points in the output cloud in a sphere of radius search_radius_ around each point

Definition at line 231 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setPolynomialFit ( bool  polynomial_fit) [inline, inherited]

Sets whether the surface and normal are approximated using a polynomial, or only via tangent estimation.

Parameters:
[in]polynomial_fitset to true for polynomial fit

Definition at line 150 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setPolynomialOrder ( int  order) [inline, inherited]

Set the order of the polynomial to be fit.

Parameters:
[in]orderthe order of the polynomial

Definition at line 140 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setSearchMethod ( const KdTreePtr tree) [inline, inherited]

Provide a pointer to the search object.

Parameters:
[in]treea pointer to the spatial search object.

Definition at line 124 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setSearchRadius ( double  radius) [inline, inherited]

Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting.

Parameters:
[in]radiusthe sphere radius that is to contain all k-nearest neighbors
Note:
Calling this method resets the squared Gaussian parameter to radius * radius !

Definition at line 161 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setSqrGaussParam ( double  sqr_gauss_param) [inline, inherited]

Set the parameter used for distance based weighting of neighbors (the square of the search radius works best in general).

Parameters:
[in]sqr_gauss_paramthe squared Gaussian parameter

Definition at line 172 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setUpsamplingMethod ( UpsamplingMethod  method) [inline, inherited]

Set the upsampling method to be used.

Note:
Options are: * NONE - no upsampling will be done, only the input points will be projected to their own MLS surfaces * SAMPLE_LOCAL_PLANE - the local plane of each input point will be sampled in a circular fashion using the upsampling_radius_ and the upsampling_step_ parameters * RANDOM_UNIFORM_DENSITY - the local plane of each input point will be sampled using an uniform random distribution such that the density of points is constant throughout the cloud - given by the desired_num_points_in_radius_ parameter * VOXEL_GRID_DILATION - the input cloud will be inserted into a voxel grid with voxels of size voxel_size_; this voxel grid will be dilated dilation_iteration_num_ times and the resulting points will be projected to the MLS surface of the closest point in the input cloud; the result is a point cloud with filled holes and a constant point density

Definition at line 195 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setUpsamplingRadius ( double  radius) [inline, inherited]

Set the radius of the circle in the local point plane that will be sampled.

Note:
Used only in the case of SAMPLE_LOCAL_PLANE upsampling
Parameters:
[in]radiusthe radius of the circle

Definition at line 203 of file mls.h.

template<typename PointInT, typename PointOutT>
void pcl::MovingLeastSquares< PointInT, PointOutT >::setUpsamplingStepSize ( double  step_size) [inline, inherited]

Set the step size for the local plane sampling.

Note:
Used only in the case of SAMPLE_LOCAL_PLANE upsampling
Parameters:
[in]step_sizethe step size

Definition at line 216 of file mls.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines