Principal Component analysis (PCA) class. More...
#include <pcl/common/pca.h>
Public Types | |
enum | FLAG { increase, preserve } |
Updating method flag. More... |
|
using | Base = pcl::PCLBase< PointT > |
using | PointCloud = typename Base::PointCloud |
using | PointCloudPtr = typename Base::PointCloudPtr |
using | PointCloudConstPtr = typename Base::PointCloudConstPtr |
using | PointIndicesPtr = typename Base::PointIndicesPtr |
using | PointIndicesConstPtr = typename Base::PointIndicesConstPtr |
Public Types inherited from pcl::PCLBase< PointT > | |
using | PointCloud = pcl::PointCloud< PointT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | PointCloudConstPtr = typename PointCloud::ConstPtr |
using | PointIndicesPtr = PointIndices::Ptr |
using | PointIndicesConstPtr = PointIndices::ConstPtr |
Public Member Functions | |
PCA (bool basis_only=false) | |
Default Constructor. More... |
|
PCA (PCA const &pca) | |
Copy Constructor. More... |
|
PCA & | operator= (PCA const &pca) |
Assignment operator. More... |
|
void | setInputCloud (const PointCloudConstPtr &cloud) override |
Provide a pointer to the input dataset. More... |
|
void | setIndices (const IndicesPtr &indices) override |
Provide a pointer to the vector of indices that represents the input data. More... |
|
void | setIndices (const IndicesConstPtr &indices) override |
Provide a pointer to the vector of indices that represents the input data. More... |
|
void | setIndices (const PointIndicesConstPtr &indices) override |
Provide a pointer to the vector of indices that represents the input data. More... |
|
void | setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols) override |
Set the indices for the points laying within an interest region of the point cloud. More... |
|
Eigen::Vector4f & | getMean () |
Mean accessor. More... |
|
Eigen::Matrix3f & | getEigenVectors () |
Eigen Vectors accessor. More... |
|
Eigen::Vector3f & | getEigenValues () |
Eigen Values accessor. More... |
|
Eigen::MatrixXf & | getCoefficients () |
Coefficients accessor. More... |
|
void | update (const PointT &input, FLAG flag=preserve) |
update PCA with a new point More... |
|
void | project (const PointT &input, PointT &projection) |
Project point on the eigenspace. More... |
|
void | project (const PointCloud &input, PointCloud &projection) |
Project cloud on the eigenspace. More... |
|
void | reconstruct (const PointT &projection, PointT &input) |
Reconstruct point from its projection. More... |
|
void | reconstruct (const PointCloud &projection, PointCloud &input) |
Reconstruct cloud from its projection. More... |
|
bool | initCompute () |
This method should get called before starting the actual computation. More... |
|
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... |
|
Public Member Functions inherited from pcl::PCLBase< PointT > | |
PCLBase () | |
Empty constructor. More... |
|
PCLBase (const PCLBase &base) | |
Copy constructor. More... |
|
virtual | ~PCLBase ()=default |
Destructor. More... |
|
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... |
|
const PointCloudConstPtr | getInputCloud () const |
Get a pointer to the input point cloud dataset. More... |
|
virtual void | setIndices (const PointIndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... |
|
IndicesPtr | getIndices () |
Get a pointer to the vector of indices used. More... |
|
const IndicesConstPtr | getIndices () const |
Get a pointer to the vector of indices used. More... |
|
const PointT & | operator[] (std::size_t pos) const |
Override PointCloud operator[] to shorten code. More... |
|
Public Attributes | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... |
|
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... |
|
Additional Inherited Members | |
Protected Member Functions inherited from pcl::PCLBase< PointT > | |
bool | initCompute () |
This method should get called before starting the actual computation. More... |
|
bool | deinitCompute () |
This method should get called after finishing the actual computation. More... |
|
Protected Attributes inherited from pcl::PCLBase< PointT > | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... |
|
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... |
|
bool | use_indices_ |
Set to true if point indices are used. More... |
|
bool | fake_indices_ |
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More... |
|
Principal Component analysis (PCA) class.
Principal components are extracted by singular values decomposition on the covariance matrix of the centered input cloud. Available data after pca computation are:
using pcl::PCA< PointT >::Base = pcl::PCLBase<PointT> |
using pcl::PCA< PointT >::PointCloud = typename Base::PointCloud |
using pcl::PCA< PointT >::PointCloudConstPtr = typename Base::PointCloudConstPtr |
using pcl::PCA< PointT >::PointCloudPtr = typename Base::PointCloudPtr |
using pcl::PCA< PointT >::PointIndicesConstPtr = typename Base::PointIndicesConstPtr |
using pcl::PCA< PointT >::PointIndicesPtr = typename Base::PointIndicesPtr |
enum pcl::PCA::FLAG |
Eigen Vectors accessor.
InitFailedException |
bool pcl::PCLBase< PointT >::initCompute |
This method should get called before starting the actual computation.
Internally, initCompute() does the following:
Definition at line 138 of file pcl_base.hpp.
| inline |
Project cloud on the eigenspace.
[in] | input | cloud from original dataset |
[out] | projection | the cloud in eigen vectors space |
InitFailedException |
Definition at line 179 of file pca.hpp.
References pcl::geometry::project().
| inline |
Project point on the eigenspace.
[in] | input | point from original dataset |
[out] | projection | the point in eigen vectors space |
InitFailedException |
| inline |
Reconstruct cloud from its projection.
[in] | projection | cloud from eigenvector space |
[out] | input | reconstructed cloud |
InitFailedException |
| inline |
Reconstruct point from its projection.
[in] | projection | point from eigenvector space |
[out] | input | reconstructed point |
InitFailedException |
| inlineoverridevirtual |
Provide a pointer to the vector of indices that represents the input data.
[in] | indices | a pointer to the indices that represent the input data. |
Reimplemented from pcl::PCLBase< PointT >.
Definition at line 144 of file pca.h.
References pcl::PCLBase< PointT >::setIndices().
| inlineoverridevirtual |
Provide a pointer to the vector of indices that represents the input data.
[in] | indices | a pointer to the indices that represent the input data. |
Reimplemented from pcl::PCLBase< PointT >.
Definition at line 134 of file pca.h.
References pcl::PCLBase< PointT >::setIndices().
| inlineoverride |
Provide a pointer to the vector of indices that represents the input data.
[in] | indices | a pointer to the indices that represent the input data. |
Definition at line 154 of file pca.h.
References pcl::PCLBase< PointT >::setIndices().
| inlineoverridevirtual |
Set the indices for the points laying within an interest region of the point cloud.
[in] | row_start | the offset on rows |
[in] | col_start | the offset on columns |
[in] | nb_rows | the number of rows to be considered row_start included |
[in] | nb_cols | the number of columns to be considered col_start included |
Reimplemented from pcl::PCLBase< PointT >.
Definition at line 169 of file pca.h.
References pcl::PCLBase< PointT >::setIndices().
void pcl::PCLBase< PointT >::setInputCloud |
Provide a pointer to the input dataset.
[in] | cloud | the const boost shared pointer to a PointCloud message |
Definition at line 65 of file pcl_base.hpp.
| inlineoverride |
Provide a pointer to the input dataset.
cloud | the const boost shared pointer to a PointCloud message |
Definition at line 124 of file pca.h.
References pcl::PCLBase< PointT >::setInputCloud().
| inline |
update PCA with a new point
[in] | input | input point |
[in] | flag | update flag |
InitFailedException |
IndicesPtr pcl::PCLBase< PointT >::indices_ |
A pointer to the vector of point indices to use.
Definition at line 150 of file pcl_base.h.
PointCloudConstPtr pcl::PCLBase< PointT >::input_ |
The input point cloud dataset.
Definition at line 147 of file pcl_base.h.
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_p_c_a.html