Point Cloud Library (PCL)  1.3.1
Public Types | Public Member Functions
pcl::MovingLeastSquares Class Reference

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

#include <pcl/surface/mls.h>

Inheritance diagram for pcl::MovingLeastSquares:
Inheritance graph
[legend]
Collaboration diagram for pcl::MovingLeastSquares:
Collaboration graph
[legend]

List of all members.

Public Types

typedef pcl::search::Search
< PointInT > 
KdTree
typedef pcl::search::Search
< PointInT >::Ptr 
KdTreePtr
typedef pcl::PointCloud
< NormalOutT > 
NormalCloudOut
typedef NormalCloudOut::Ptr NormalCloudOutPtr
typedef NormalCloudOut::ConstPtr NormalCloudOutConstPtr
typedef pcl::PointCloud< PointInT > PointCloudIn
typedef PointCloudIn::Ptr PointCloudInPtr
typedef PointCloudIn::ConstPtr PointCloudInConstPtr
typedef boost::function< int(int,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethod
typedef pcl::PointCloud< PointT > PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 MovingLeastSquares ()
 Empty constructor.
void setOutputNormals (NormalCloudOutPtr cloud)
 Provide a pointer to an point cloud where normal information should be saved.
NormalCloudOutPtr getOutputNormals ()
 Returns a pointer to the point cloud where normal information was saved during reconstruction.
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 ()
 Get the parameter for distance based weighting of neighbors.
void reconstruct (PointCloudIn &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
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 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 PointT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

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

Author:
Zoltan Csaba Marton and Radu Bogdan Rusu

Member Typedef Documentation

Definition at line 69 of file mls.h.

Definition at line 70 of file mls.h.

Definition at line 72 of file mls.h.

Definition at line 74 of file mls.h.

Definition at line 73 of file mls.h.

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

Definition at line 74 of file pcl_base.h.

Definition at line 76 of file pcl_base.h.

Definition at line 76 of file mls.h.

Definition at line 78 of file mls.h.

Definition at line 77 of file mls.h.

Definition at line 75 of file pcl_base.h.

Definition at line 79 of file pcl_base.h.

Definition at line 78 of file pcl_base.h.

typedef boost::function<int (int, double, std::vector<int> &, std::vector<float> &)> pcl::MovingLeastSquares::SearchMethod

Definition at line 80 of file mls.h.


Constructor & Destructor Documentation

pcl::MovingLeastSquares::MovingLeastSquares ( ) [inline]

Empty constructor.

Definition at line 83 of file mls.h.


Member Function Documentation

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

Get a pointer to the vector of indices used.

Definition at line 171 of file pcl_base.h.

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

Get a pointer to the input point cloud dataset.

Definition at line 99 of file pcl_base.h.

NormalCloudOutPtr pcl::MovingLeastSquares::getOutputNormals ( ) [inline]

Returns a pointer to the point cloud where normal information was saved during reconstruction.

Definition at line 94 of file mls.h.

bool pcl::MovingLeastSquares::getPolynomialFit ( ) [inline]

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

Definition at line 130 of file mls.h.

int pcl::MovingLeastSquares::getPolynomialOrder ( ) [inline]

Get the order of the polynomial to be fit.

Definition at line 120 of file mls.h.

KdTreePtr pcl::MovingLeastSquares::getSearchMethod ( ) [inline]

Get a pointer to the search method used.

Definition at line 110 of file mls.h.

double pcl::MovingLeastSquares::getSearchRadius ( ) [inline]

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

Definition at line 141 of file mls.h.

double pcl::MovingLeastSquares::getSqrGaussParam ( ) [inline]

Get the parameter for distance based weighting of neighbors.

Definition at line 152 of file mls.h.

const PointT& pcl::PCLBase::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 178 of file pcl_base.h.

void pcl::MovingLeastSquares::reconstruct ( PointCloudIn output)

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

Parameters:
outputthe resultant reconstructed surface model

Definition at line 48 of file mls.hpp.

void pcl::PCLBase::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 105 of file pcl_base.h.

void pcl::PCLBase::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 116 of file pcl_base.h.

void pcl::PCLBase::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 132 of file pcl_base.h.

virtual void pcl::PCLBase::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 95 of file pcl_base.h.

void pcl::MovingLeastSquares::setOutputNormals ( NormalCloudOutPtr  cloud) [inline]

Provide a pointer to an point cloud where normal information should be saved.

Note:
This is optional, it can be the same as the parameter to the reconstruction method, but no normals are estimated if it is not set.
Parameters:
cloudthe const boost shared pointer to a point cloud with normal

Definition at line 90 of file mls.h.

void pcl::MovingLeastSquares::setPolynomialFit ( bool  polynomial_fit) [inline]

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

Parameters:
polynomial_fitset to true for polynomial fit

Definition at line 126 of file mls.h.

void pcl::MovingLeastSquares::setPolynomialOrder ( int  order) [inline]

Set the order of the polynomial to be fit.

Parameters:
orderthe order of the polynomial

Definition at line 116 of file mls.h.

void pcl::MovingLeastSquares::setSearchMethod ( const KdTreePtr tree) [inline]

Provide a pointer to the search object.

Parameters:
treea pointer to the spatial search object.

Definition at line 100 of file mls.h.

void pcl::MovingLeastSquares::setSearchRadius ( double  radius) [inline]

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

Parameters:
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 137 of file mls.h.

void pcl::MovingLeastSquares::setSqrGaussParam ( double  sqr_gauss_param) [inline]

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

Note:
sqr_gauss_param the squared Gaussian parameter

Definition at line 148 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