Point Cloud Library (PCL)
1.11.1-dev
|
54 template <
typename real,
int dimension>
59 using MatrixType = Eigen::Matrix<real, dimension, dimension>;
121 #include <pcl/common/impl/vector_average.hpp>
real getAccumulatedWeight() const
Get the summed up weight of all added vectors.
Defines all the PCL and non-PCL macros used.
void getEigenVector1(VectorType &eigen_vector1) const
Get the eigenvector corresponding to the smallest eigenvalue.
const MatrixType & getCovariance() const
Get the covariance matrix of the added vectors.
const VectorType & getMean() const
Get the mean of the added vectors.
VectorAverage()
Constructor - dimension gives the size of the vectors to work with.
Eigen::Matrix< real, dimension, 1 > VectorType
void reset()
Reset the object to work with a new data set.
unsigned int getNoOfSamples()
Get the number of added vectors.
void doPCA(VectorType &eigen_values, VectorType &eigen_vector1, VectorType &eigen_vector2, VectorType &eigen_vector3) const
Do Principal component analysis.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Calculates the weighted average and the covariance matrix.
unsigned int noOfSamples_
void add(const VectorType &sample, real weight=1.0)
Add a new sample.
Eigen::Matrix< real, dimension, dimension > MatrixType
Defines functions, macros and traits for allocating and using memory.