normal_coherence.h
#ifndef PCL_TRACKING_NORMAL_COHERENCE_H_
#define PCL_TRACKING_NORMAL_COHERENCE_H_
#include <pcl/tracking/coherence.h>
namespace pcl
{
namespace tracking
{
/** \brief @b NormalCoherence computes coherence between two points from the angle
between their normals. the coherence is calculated by 1 / (1 + weight * theta^2 ).
* \author Ryohei Ueda
* \ingroup tracking
*/
template <typename PointInT>
class NormalCoherence: public PointCoherence<PointInT>
{
public:
/** \brief initialize the weight to 1.0. */
NormalCoherence ()
: PointCoherence<PointInT> ()
, weight_ (1.0)
{}
/** \brief set the weight of coherence
* \param weight the weight of coherence
*/
inline void setWeight (double weight) { weight_ = weight; }
/** \brief get the weight of coherence */
inline double getWeight () { return weight_; }
protected:
/** \brief return the normal coherence between the two points.
* \param source instance of source point.
* \param target instance of target point.
*/
double computeCoherence (PointInT &source, PointInT &target);
/** \brief the weight of coherence */
double weight_;
};
}
}
// #include <pcl/tracking/impl/normal_coherence.hpp>
#ifdef PCL_NO_PRECOMPILE
#include <pcl/tracking/impl/normal_coherence.hpp>
#endif
#endif
pcl::tracking::NormalCoherence::weight_
double weight_
the weight of coherence
Definition: normal_coherence.h:42
pcl::tracking::NormalCoherence
NormalCoherence computes coherence between two points from the angle between their normals...
Definition: normal_coherence.h:15
pcl
Definition: convolution.h:45
pcl::tracking::PointCoherence
PointCoherence is a base class to compute coherence between the two points.
Definition: coherence.h:17
pcl::tracking::NormalCoherence::getWeight
double getWeight()
get the weight of coherence
Definition: normal_coherence.h:31
pcl::tracking::NormalCoherence::NormalCoherence
NormalCoherence()
initialize the weight to 1.0.
Definition: normal_coherence.h:20
pcl::tracking::NormalCoherence::computeCoherence
double computeCoherence(PointInT &source, PointInT &target)
return the normal coherence between the two points.
Definition: normal_coherence.hpp:9
pcl::tracking::NormalCoherence::setWeight
void setWeight(double weight)
set the weight of coherence
Definition: normal_coherence.h:28