Point Cloud Library (PCL)
1.7.0
Main Page
Modules
Namespaces
Classes
tracking
include
pcl
tracking
normal_coherence.h
1
#ifndef PCL_TRACKING_NORMAL_COHERENCE_H_
2
#define PCL_TRACKING_NORMAL_COHERENCE_H_
3
4
#include <pcl/tracking/coherence.h>
5
namespace
pcl
6
{
7
namespace
tracking
8
{
9
/** \brief @b NormalCoherence computes coherence between two points from the angle
10
between their normals. the coherence is calculated by 1 / (1 + weight * theta^2 ).
11
* \author Ryohei Ueda
12
* \ingroup tracking
13
*/
14
template
<
typename
Po
int
InT>
15
class
NormalCoherence
:
public
PointCoherence
<PointInT>
16
{
17
public
:
18
19
/** \brief initialize the weight to 1.0. */
20
NormalCoherence
()
21
:
PointCoherence
<PointInT> ()
22
,
weight_
(1.0)
23
{}
24
25
/** \brief set the weight of coherence
26
* \param weight the weight of coherence
27
*/
28
inline
void
setWeight
(
double
weight) {
weight_
= weight; }
29
30
/** \brief get the weight of coherence */
31
inline
double
getWeight
() {
return
weight_
; }
32
33
protected
:
34
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
computeCoherence
(PointInT &source, PointInT &target);
40
41
/** \brief the weight of coherence */
42
double
weight_
;
43
44
};
45
}
46
}
47
48
// #include <pcl/tracking/impl/normal_coherence.hpp>
49
#ifdef PCL_NO_PRECOMPILE
50
#include <pcl/tracking/impl/normal_coherence.hpp>
51
#endif
52
53
#endif