Go to the documentation of this file.00001 #ifndef PCL_TRACKING_IMPL_DISTANCE_COHERENCE_H_
00002 #define PCL_TRACKING_IMPL_DISTANCE_COHERENCE_H_
00003
00004 #include <Eigen/Dense>
00005
00006 namespace pcl
00007 {
00008 namespace tracking
00009 {
00010 template <typename PointInT> double
00011 DistanceCoherence<PointInT>::computeCoherence (PointInT &source, PointInT &target)
00012 {
00013 Eigen::Vector4f p = source.getVector4fMap ();
00014 Eigen::Vector4f p_dash = target.getVector4fMap ();
00015 double d = (p - p_dash).norm ();
00016 return 1.0 / (1.0 + d * d * weight_);
00017 }
00018 }
00019 }
00020
00021 #define PCL_INSTANTIATE_DistanceCoherence(T) template class PCL_EXPORTS pcl::tracking::DistanceCoherence<T>;
00022
00023 #endif