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> 11 template <
typename Po
intInT>
void 17 for (
size_t i = 0; i < cloud->points.size (); i++)
20 float k_distance = 0.0;
22 PointInT input_point = cloud->points[i];
23 search_->approxNearestSearch(input_point, k_index, k_distance);
24 if (k_distance < maximum_distance_ * maximum_distance_)
26 PointInT target_point = target_input_->points[k_index];
27 double coherence_val = 1.0;
28 for (
size_t i = 0; i < point_coherences_.size (); i++)
31 double w = coherence->compute (input_point, target_point);
37 w = - static_cast<float> (val);
40 template <
typename Po
intInT>
bool 45 PCL_ERROR (
"[pcl::%s::initCompute] PointCloudCoherence::Init failed.\n", getClassName ().c_str ());
54 if (new_target_ && target_input_)
56 search_->setInputCloud (target_input_);
66 #define PCL_INSTANTIATE_ApproxNearestPairPointCloudCoherence(T) template class PCL_EXPORTS pcl::tracking::ApproxNearestPairPointCloudCoherence<T>; This file defines compatibility wrappers for low level I/O functions.
NearestPairPointCloudCoherence< PointInT >::PointCoherencePtr PointCoherencePtr
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pc...
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
virtual bool initCompute()
This method should get called before starting the actual computation.
virtual void computeCoherence(const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices, float &w_j)
compute the nearest pairs and compute coherence using point_coherences_
NearestPairPointCloudCoherence< PointInT >::PointCloudInConstPtr PointCloudInConstPtr