1#ifndef PCL_TRACKING_IMPL_APPROX_NEAREST_PAIR_POINT_CLOUD_COHERENCE_H_
2#define PCL_TRACKING_IMPL_APPROX_NEAREST_PAIR_POINT_CLOUD_COHERENCE_H_
4#include <pcl/search/octree.h>
5#include <pcl/tracking/approx_nearest_pair_point_cloud_coherence.h>
9template <
typename Po
intInT>
16 for (
const auto& point : *cloud) {
18 float k_distance = 0.0;
20 PointInT input_point = point;
21 search_->approxNearestSearch(input_point, k_index, k_distance);
23 PointInT target_point = (*target_input_)[k_index];
24 double coherence_val = 1.0;
27 double w = coherence->compute(input_point, target_point);
33 w = -
static_cast<float>(val);
36template <
typename Po
intInT>
41 PCL_ERROR(
"[pcl::%s::initCompute] PointCloudCoherence::Init failed.\n",
62#define PCL_INSTANTIATE_ApproxNearestPairPointCloudCoherence(T) \
63 template class PCL_EXPORTS pcl::tracking::ApproxNearestPairPointCloudCoherence<T>;
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pc...
pcl::search::Octree< PointInT >::Ptr search_
bool initCompute() override
This method should get called before starting the actual computation.
typename NearestPairPointCloudCoherence< PointInT >::PointCloudInConstPtr PointCloudInConstPtr
typename NearestPairPointCloudCoherence< PointInT >::PointCoherencePtr PointCoherencePtr
void computeCoherence(const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices, float &w_j) override
compute the nearest pairs and compute coherence using point_coherences_
bool new_target_
A flag which is true if target_input_ is updated.
double maximum_distance_
max of distance for points to be taken into account
PointCloudInConstPtr target_input_
a pointer to target point cloud
const std::string & getClassName() const
Get a string representation of the name of this class.
virtual bool initCompute()
This method should get called before starting the actual computation.
std::vector< PointCoherencePtr > point_coherences_
a list of pointers to PointCoherence.
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
shared_ptr< const Indices > IndicesConstPtr