Point Cloud Library (PCL)
1.11.1
pcl
tracking
normal_coherence.h
1
#pragma once
2
3
#include <pcl/tracking/coherence.h>
4
5
namespace
pcl
{
6
namespace
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
*/
12
template
<
typename
Po
int
InT>
13
class
NormalCoherence
:
public
PointCoherence
<PointInT> {
14
public
:
15
/** \brief initialize the weight to 1.0. */
16
NormalCoherence
() :
PointCoherence
<PointInT>(),
weight_
(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
29
getWeight
()
30
{
31
return
weight_
;
32
}
33
34
protected
:
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
40
computeCoherence
(PointInT& source, PointInT& target)
override
;
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
pcl
Definition:
convolution.h:46
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::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::NormalCoherence
NormalCoherence()
initialize the weight to 1.0.
Definition:
normal_coherence.h:16
pcl::tracking::NormalCoherence::weight_
double weight_
the weight of coherence
Definition:
normal_coherence.h:43
pcl::tracking::PointCoherence
PointCoherence is a base class to compute coherence between the two points.
Definition:
coherence.h:15
pcl::tracking::NormalCoherence
NormalCoherence computes coherence between two points from the angle between their normals.
Definition:
normal_coherence.h:13