Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions | Protected Attributes
pcl::ndt2d::NormalDist< PointT > Class Template Reference

A normal distribution estimation class. More...

#include <pcl/registration/impl/ndt_2d.hpp>

Public Member Functions

 NormalDist ()
 
void addIdx (size_t i)
 Store a point index to use later for estimating distribution parameters. More...
 
void estimateParams (const PointCloud &cloud, double min_covar_eigvalue_mult=0.001)
 Estimate the normal distribution parameters given the point indices provided. More...
 
ValueAndDerivatives< 3, double > test (const PointT &transformed_pt, const double &cos_theta, const double &sin_theta) const
 Return the 'score' (denormalised likelihood) and derivatives of score of the point p given this distribution. More...
 

Protected Attributes

const size_t min_n_
 
size_t n_
 
std::vector< size_t > pt_indices_
 
Eigen::Vector2d mean_
 
Eigen::Matrix2d covar_inv_
 

Detailed Description

template<typename PointT>
class pcl::ndt2d::NormalDist< PointT >

A normal distribution estimation class.

First the indices of of the points from a point cloud that should be modelled by the distribution are added with addIdx (...).

Then estimateParams (...) uses the stored point indices to estimate the parameters of a normal distribution, and discards the stored indices.

Finally the distriubution, and its derivatives, may be evaluated at any point using test (...).

Definition at line 96 of file ndt_2d.hpp.

Constructor & Destructor Documentation

template<typename PointT >
pcl::ndt2d::NormalDist< PointT >::NormalDist ( )
inline

Definition at line 101 of file ndt_2d.hpp.

Member Function Documentation

template<typename PointT >
void pcl::ndt2d::NormalDist< PointT >::addIdx ( size_t  i)
inline

Store a point index to use later for estimating distribution parameters.

Parameters
[in]iPoint index to store

Definition at line 110 of file ndt_2d.hpp.

Referenced by pcl::ndt2d::NDTSingleGrid< PointT >::NDTSingleGrid().

template<typename PointT >
void pcl::ndt2d::NormalDist< PointT >::estimateParams ( const PointCloud cloud,
double  min_covar_eigvalue_mult = 0.001 
)
inline

Estimate the normal distribution parameters given the point indices provided.

Memory of point indices is cleared.

Parameters
[in]cloudPoint cloud corresponding to indices passed to addIdx.
[in]min_covar_eigvalue_multSet the smallest eigenvalue to this times the largest.

Definition at line 120 of file ndt_2d.hpp.

template<typename PointT >
ValueAndDerivatives<3,double> pcl::ndt2d::NormalDist< PointT >::test ( const PointT transformed_pt,
const double &  cos_theta,
const double &  sin_theta 
) const
inline

Return the 'score' (denormalised likelihood) and derivatives of score of the point p given this distribution.

Parameters
[in]transformed_ptLocation to evaluate at.
[in]cos_thetasin(theta) of the current rotation angle of rigid transformation: to avoid repeated evaluation
[in]sin_thetacos(theta) of the current rotation angle of rigid transformation: to avoid repeated evaluation estimateParams must have been called after at least three points were provided, or this will return zero.

Definition at line 165 of file ndt_2d.hpp.

References pcl::ndt2d::ValueAndDerivatives< N, T >::grad, pcl::ndt2d::ValueAndDerivatives< N, T >::hessian, pcl::ndt2d::ValueAndDerivatives< N, T >::value, and pcl::ndt2d::ValueAndDerivatives< N, T >::Zero().

Referenced by pcl::ndt2d::NDTSingleGrid< PointT >::test().

Member Data Documentation

template<typename PointT >
Eigen::Matrix2d pcl::ndt2d::NormalDist< PointT >::covar_inv_
protected

Definition at line 210 of file ndt_2d.hpp.

template<typename PointT >
Eigen::Vector2d pcl::ndt2d::NormalDist< PointT >::mean_
protected

Definition at line 209 of file ndt_2d.hpp.

template<typename PointT >
const size_t pcl::ndt2d::NormalDist< PointT >::min_n_
protected

Definition at line 205 of file ndt_2d.hpp.

template<typename PointT >
size_t pcl::ndt2d::NormalDist< PointT >::n_
protected

Definition at line 207 of file ndt_2d.hpp.

template<typename PointT >
std::vector<size_t> pcl::ndt2d::NormalDist< PointT >::pt_indices_
protected

Definition at line 208 of file ndt_2d.hpp.


The documentation for this class was generated from the following file: