normal_coherence.h
#pragma once
#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) override;
/** \brief the weight of coherence */
double weight_;
};
} // namespace tracking
} // namespace pcl
// #include <pcl/tracking/impl/normal_coherence.hpp>
#ifdef PCL_NO_PRECOMPILE
#include <pcl/tracking/impl/normal_coherence.hpp>
#endif
pcl::tracking::NormalCoherence
NormalCoherence computes coherence between two points from the angle between their normals.
Definition: normal_coherence.h:13
pcl::tracking::NormalCoherence::weight_
double weight_
the weight of coherence
Definition: normal_coherence.h:43
pcl::tracking::NormalCoherence::NormalCoherence
NormalCoherence()
initialize the weight to 1.0.
Definition: normal_coherence.h:16
pcl::tracking::NormalCoherence::getWeight
double getWeight()
get the weight of coherence
Definition: normal_coherence.h:29
pcl::tracking::NormalCoherence::setWeight
void setWeight(double weight)
set the weight of coherence
Definition: normal_coherence.h:22
pcl::tracking::NormalCoherence::computeCoherence
double computeCoherence(PointInT &source, PointInT &target) override
return the normal coherence between the two points.
Definition: normal_coherence.hpp:12
pcl::tracking::PointCoherence
PointCoherence is a base class to compute coherence between the two points.
Definition: coherence.h:15
pcl
Definition: convolution.h:46