3 #include <pcl/pcl_base.h>
14 template <
typename Po
intInT>
17 using Ptr = shared_ptr<PointCoherence<PointInT>>;
18 using ConstPtr = shared_ptr<const PointCoherence<PointInT>>;
32 compute(PointInT& source, PointInT& target);
46 inline const std::string&
58 template <
typename Po
intInT>
61 using Ptr = shared_ptr<PointCloudCoherence<PointInT>>;
62 using ConstPtr = shared_ptr<const PointCloudCoherence<PointInT>>;
82 inline std::vector<PointCoherencePtr>
131 inline const std::string&
150 #include <pcl/tracking/impl/coherence.hpp>
shared_ptr< PointCloud< PointInT > > Ptr
shared_ptr< const PointCloud< PointInT > > ConstPtr
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
const std::string & getClassName() const
Get a string representation of the name of this class.
PointCloudInConstPtr target_input_
a pointer to target point cloud
virtual bool initCompute()
This method should get called before starting the actual computation.
void setPointCoherences(std::vector< PointCoherencePtr > coherences)
set a list of pcl::tracking::PointCoherence.
typename PointCloudIn::ConstPtr PointCloudInConstPtr
typename PointCoherence< PointInT >::Ptr PointCoherencePtr
virtual ~PointCloudCoherence()=default
Destructor.
virtual void setTargetCloud(const PointCloudInConstPtr &cloud)
add a PointCoherence to the PointCloudCoherence.
double calcPointCoherence(PointInT &source, PointInT &target)
std::string coherence_name_
The coherence name.
std::vector< PointCoherencePtr > point_coherences_
a list of pointers to PointCoherence.
PointCloudCoherence()
Constructor.
shared_ptr< PointCloudCoherence< PointInT > > Ptr
std::vector< PointCoherencePtr > getPointCoherences()
get a list of pcl::tracking::PointCoherence.
virtual void computeCoherence(const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices, float &w_j)=0
Abstract method to compute coherence.
void addPointCoherence(PointCoherencePtr coherence)
add a PointCoherence to the PointCloudCoherence.
shared_ptr< const PointCloudCoherence< PointInT > > ConstPtr
void compute(const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices, float &w_i)
compute coherence between two pointclouds.
typename PointCloudIn::Ptr PointCloudInPtr
PointCoherence is a base class to compute coherence between the two points.
std::string coherence_name_
The coherence name.
const std::string & getClassName() const
Get a string representation of the name of this class.
double compute(PointInT &source, PointInT &target)
compute coherence from the source point to the target point.
PointCoherence()=default
empty constructor
shared_ptr< const PointCoherence< PointInT > > ConstPtr
shared_ptr< PointCoherence< PointInT > > Ptr
virtual double computeCoherence(PointInT &source, PointInT &target)=0
abstract method to calculate coherence.
virtual ~PointCoherence()=default
empty destructor
shared_ptr< const Indices > IndicesConstPtr