Point Cloud Library (PCL) 1.12.0
Loading...
Searching...
No Matches
normal_coherence.h
1#pragma once
2
3#include <pcl/tracking/coherence.h>
4
5namespace pcl {
6namespace tracking {
7/** \brief @b NormalCoherence computes coherence between two points from the angle
8 * between their normals. the coherence is calculated by 1 / (1 + weight * theta^2 ).
9 * \author Ryohei Ueda
10 * \ingroup tracking
11 */
12template <typename PointInT>
13class NormalCoherence : public PointCoherence<PointInT> {
14public:
15 /** \brief initialize the weight to 1.0. */
17
18 /** \brief set the weight of coherence
19 * \param weight the weight of coherence
20 */
21 inline void
22 setWeight(double weight)
23 {
24 weight_ = weight;
25 }
26
27 /** \brief get the weight of coherence */
28 inline double
30 {
31 return weight_;
32 }
33
34protected:
35 /** \brief return the normal coherence between the two points.
36 * \param source instance of source point.
37 * \param target instance of target point.
38 */
39 double
41
42 /** \brief the weight of coherence */
43 double weight_;
44};
45} // namespace tracking
46} // namespace pcl
47
48// #include <pcl/tracking/impl/normal_coherence.hpp>
49#ifdef PCL_NO_PRECOMPILE
50#include <pcl/tracking/impl/normal_coherence.hpp>
51#endif
Iterator class for point clouds with or without given indices.
NormalCoherence computes coherence between two points from the angle between their normals.
double weight_
the weight of coherence
NormalCoherence()
initialize the weight to 1.0.
double getWeight()
get the weight of coherence
void setWeight(double weight)
set the weight of coherence
double computeCoherence(PointInT &source, PointInT &target) override
return the normal coherence between the two points.
PointCoherence is a base class to compute coherence between the two points.
Definition coherence.h:15