40#include <pcl/common/eigen.h>
41#include <pcl/common/vector_average.h>
43#include <Eigen/Eigenvalues>
47 template <
typename real,
int dimension>
53 template <
typename real,
int dimension>
57 accumulatedWeight_ = 0.0;
62 template <
typename real,
int dimension>
68 accumulatedWeight_ += weight;
71 Eigen::Matrix<real, dimension, 1>
diff = sample - mean_;
83 template <
typename real,
int dimension>
98 Eigen::SelfAdjointEigenSolver<Eigen::Matrix<real, dimension, dimension> >
ei_symm(covariance_);
99 eigen_values =
ei_symm.eigenvalues();
107 template <
typename real,
int dimension>
116 Eigen::SelfAdjointEigenSolver<Eigen::Matrix<real, dimension, dimension> >
ei_symm(covariance_,
false);
117 eigen_values =
ei_symm.eigenvalues();
120 template <
typename real,
int dimension>
134 Eigen::SelfAdjointEigenSolver<Eigen::Matrix<real, dimension, dimension> >
ei_symm(covariance_);
Iterator class for point clouds with or without given indices.
ConstCloudIterator(const PointCloud< PointT > &cloud)
void add(const VectorType &sample, real weight=1.0)
Add a new sample.
void reset()
Reset the object to work with a new data set.
VectorAverage()
Constructor - dimension gives the size of the vectors to work with.
void doPCA(VectorType &eigen_values, VectorType &eigen_vector1, VectorType &eigen_vector2, VectorType &eigen_vector3) const
Do Principal component analysis.
void getEigenVector1(VectorType &eigen_vector1) const
Get the eigenvector corresponding to the smallest eigenvalue.
void eigen33(const Matrix &mat, typename Matrix::Scalar &eigenvalue, Vector &eigenvector)
determines the eigenvector and eigenvalue of the smallest eigenvalue of the symmetric positive semi d...
void computeRoots(const Matrix &m, Roots &roots)
computes the roots of the characteristic polynomial of the input matrix m, which are the eigenvalues