Calculates the weighted average and the covariance matrix. More...
#include <pcl/common/vector_average.h>
Public Types | |
using | VectorType = Eigen::Matrix< real, dimension, 1 > |
using | MatrixType = Eigen::Matrix< real, dimension, dimension > |
Public Member Functions | |
VectorAverage () | |
Constructor - dimension gives the size of the vectors to work with. More... |
|
void | reset () |
Reset the object to work with a new data set. More... |
|
const VectorType & | getMean () const |
Get the mean of the added vectors. More... |
|
const MatrixType & | getCovariance () const |
Get the covariance matrix of the added vectors. More... |
|
real | getAccumulatedWeight () const |
Get the summed up weight of all added vectors. More... |
|
unsigned int | getNoOfSamples () |
Get the number of added vectors. More... |
|
void | add (const VectorType &sample, real weight=1.0) |
Add a new sample. More... |
|
void | doPCA (VectorType &eigen_values, VectorType &eigen_vector1, VectorType &eigen_vector2, VectorType &eigen_vector3) const |
Do Principal component analysis. More... |
|
void | doPCA (VectorType &eigen_values) const |
Do Principal component analysis. More... |
|
void | getEigenVector1 (VectorType &eigen_vector1) const |
Get the eigenvector corresponding to the smallest eigenvalue. More... |
|
void | doPCA (Eigen::Matrix< float, 3, 1 > &eigen_values, Eigen::Matrix< float, 3, 1 > &eigen_vector1, Eigen::Matrix< float, 3, 1 > &eigen_vector2, Eigen::Matrix< float, 3, 1 > &eigen_vector3) const |
void | doPCA (Eigen::Matrix< float, 3, 1 > &eigen_values) const |
void | getEigenVector1 (Eigen::Matrix< float, 3, 1 > &eigen_vector1) const |
void | doPCA (Eigen::Matrix< double, 3, 1 > &eigen_values, Eigen::Matrix< double, 3, 1 > &eigen_vector1, Eigen::Matrix< double, 3, 1 > &eigen_vector2, Eigen::Matrix< double, 3, 1 > &eigen_vector3) const |
void | doPCA (Eigen::Matrix< double, 3, 1 > &eigen_values) const |
void | getEigenVector1 (Eigen::Matrix< double, 3, 1 > &eigen_vector1) const |
Protected Attributes | |
unsigned int | noOfSamples_ = 0 |
real | accumulatedWeight_ = 0 |
VectorType | mean_ = VectorType::Identity () |
MatrixType | covariance_ = MatrixType::Identity () |
Calculates the weighted average and the covariance matrix.
A class to calculate the weighted average and the covariance matrix of a set of vectors with given weights. The original data is not saved. Mean and covariance are calculated iteratively.
Definition at line 55 of file vector_average.h.
using pcl::VectorAverage< real, dimension >::MatrixType = Eigen::Matrix<real, dimension, dimension> |
Definition at line 59 of file vector_average.h.
using pcl::VectorAverage< real, dimension >::VectorType = Eigen::Matrix<real, dimension, 1> |
Definition at line 58 of file vector_average.h.
pcl::VectorAverage< real, dimension >::VectorAverage |
Constructor - dimension gives the size of the vectors to work with.
Definition at line 48 of file vector_average.hpp.
| inline |
Add a new sample.
Definition at line 63 of file vector_average.hpp.
Referenced by pcl::RangeImageBorderExtractor::calculateMainPrincipalCurvature(), pcl::RangeImage::getCurvature(), pcl::RangeImage::getNormal(), pcl::RangeImage::getSurfaceInformation(), pcl::GridProjection< PointNT >::getVectorAtPoint(), and pcl::GridProjection< PointNT >::getVectorAtPointKNN().
| inline |
Definition at line 188 of file vector_average.hpp.
References pcl::computeRoots().
| inline |
Definition at line 177 of file vector_average.hpp.
References pcl::eigen33().
| inline |
Definition at line 158 of file vector_average.hpp.
References pcl::computeRoots().
| inline |
Definition at line 147 of file vector_average.hpp.
References pcl::eigen33().
| inline |
Do Principal component analysis.
Definition at line 108 of file vector_average.hpp.
| inline |
Do Principal component analysis.
Definition at line 84 of file vector_average.hpp.
Referenced by pcl::RangeImageBorderExtractor::calculateMainPrincipalCurvature(), pcl::RangeImage::getCurvature(), pcl::RangeImage::getNormal(), and pcl::RangeImage::getSurfaceInformation().
| inline |
Get the summed up weight of all added vectors.
Definition at line 79 of file vector_average.h.
References pcl::VectorAverage< real, dimension >::accumulatedWeight_.
| inline |
Get the covariance matrix of the added vectors.
Definition at line 75 of file vector_average.h.
References pcl::VectorAverage< real, dimension >::covariance_.
| inline |
Definition at line 194 of file vector_average.hpp.
References pcl::eigen33().
| inline |
Definition at line 164 of file vector_average.hpp.
References pcl::eigen33().
| inline |
Get the eigenvector corresponding to the smallest eigenvalue.
Definition at line 121 of file vector_average.hpp.
Referenced by pcl::GridProjection< PointNT >::getVectorAtPointKNN().
| inline |
Get the mean of the added vectors.
Definition at line 71 of file vector_average.h.
References pcl::VectorAverage< real, dimension >::mean_.
Referenced by pcl::RangeImage::getNormal(), pcl::RangeImage::getSurfaceInformation(), and pcl::GridProjection< PointNT >::getVectorAtPoint().
| inline |
Get the number of added vectors.
Definition at line 83 of file vector_average.h.
References pcl::VectorAverage< real, dimension >::noOfSamples_.
Referenced by pcl::RangeImageBorderExtractor::calculateMainPrincipalCurvature(), pcl::RangeImage::getCurvature(), pcl::RangeImage::getNormal(), and pcl::RangeImage::getSurfaceInformation().
| inline |
Reset the object to work with a new data set.
Definition at line 54 of file vector_average.hpp.
| protected |
Definition at line 111 of file vector_average.h.
Referenced by pcl::VectorAverage< real, dimension >::getAccumulatedWeight().
| protected |
Definition at line 113 of file vector_average.h.
Referenced by pcl::VectorAverage< real, dimension >::getCovariance().
| protected |
Definition at line 112 of file vector_average.h.
Referenced by pcl::VectorAverage< real, dimension >::getMean().
| protected |
Definition at line 110 of file vector_average.h.
Referenced by pcl::VectorAverage< real, dimension >::getNoOfSamples().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_vector_average.html