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