Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
tracking
distance_coherence.h
1
#pragma once
2
3
#include <pcl/tracking/coherence.h>
4
#include <
pcl/memory.h
>
5
6
namespace
pcl
{
7
namespace
tracking
{
8
/** \brief @b DistanceCoherence computes coherence between two points from the distance
9
* between them. the coherence is calculated by 1 / (1 + weight * d^2 ).
10
* \author Ryohei Ueda
11
* \ingroup tracking
12
*/
13
template
<
typename
Po
int
InT>
14
class
DistanceCoherence
:
public
PointCoherence
<PointInT> {
15
public
:
16
using
Ptr
= shared_ptr<DistanceCoherence<PointInT>>;
17
using
ConstPtr
= shared_ptr<const DistanceCoherence<PointInT>>;
18
19
/** \brief initialize the weight to 1.0. */
20
DistanceCoherence
() :
PointCoherence
<PointInT>() {}
21
22
/** \brief set the weight of coherence.
23
* \param weight the value of the wehgit.
24
*/
25
inline
void
26
setWeight
(
double
weight)
27
{
28
weight_
= weight;
29
}
30
31
/** \brief get the weight of coherence.*/
32
inline
double
33
getWeight
()
34
{
35
return
weight_
;
36
}
37
38
protected
:
39
/** \brief return the distance coherence between the two points.
40
* \param source instance of source point.
41
* \param target instance of target point.
42
*/
43
double
44
computeCoherence
(PointInT& source, PointInT& target)
override
;
45
46
/** \brief the weight of coherence.*/
47
double
weight_
{1.0};
48
};
49
}
// namespace tracking
50
}
// namespace pcl
51
52
#ifdef PCL_NO_PRECOMPILE
53
#include <pcl/tracking/impl/distance_coherence.hpp>
54
#endif
pcl::tracking::DistanceCoherence::getWeight
double getWeight()
get the weight of coherence.
Definition
distance_coherence.h:33
pcl::tracking::DistanceCoherence::Ptr
shared_ptr< DistanceCoherence< PointInT > > Ptr
Definition
distance_coherence.h:16
pcl::tracking::DistanceCoherence::setWeight
void setWeight(double weight)
set the weight of coherence.
Definition
distance_coherence.h:26
pcl::tracking::DistanceCoherence::DistanceCoherence
DistanceCoherence()
initialize the weight to 1.0.
Definition
distance_coherence.h:20
pcl::tracking::DistanceCoherence::ConstPtr
shared_ptr< const DistanceCoherence< PointInT > > ConstPtr
Definition
distance_coherence.h:17
pcl::tracking::DistanceCoherence::computeCoherence
double computeCoherence(PointInT &source, PointInT &target) override
return the distance coherence between the two points.
Definition
distance_coherence.hpp:10
pcl::tracking::DistanceCoherence::weight_
double weight_
the weight of coherence.
Definition
distance_coherence.h:47
pcl::tracking::PointCoherence::PointCoherence
PointCoherence()=default
empty constructor
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::tracking
Definition
approx_nearest_pair_point_cloud_coherence.h:7
pcl
Definition
convolution.h:46