/usr/include/pcl-1.7/pcl/tracking/coherence.h is in libpcl-dev 1.7.2-14build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | #ifndef PCL_TRACKING_COHERENCE_H_
#define PCL_TRACKING_COHERENCE_H_
#include <pcl/pcl_base.h>
namespace pcl
{
namespace tracking
{
/** \brief @b PointCoherence is a base class to compute coherence between the two points.
* \author Ryohei Ueda
* \ingroup tracking
*/
template <typename PointInT>
class PointCoherence
{
public:
typedef boost::shared_ptr< PointCoherence<PointInT> > Ptr;
typedef boost::shared_ptr< const PointCoherence<PointInT> > ConstPtr;
public:
/** \brief empty constructor */
PointCoherence () : coherence_name_ () {}
/** \brief empty distructor */
virtual ~PointCoherence () {}
/** \brief compute coherence from the source point to the target point.
* \param source instance of source point.
* \param target instance of target point.
*/
inline double
compute (PointInT &source, PointInT &target);
protected:
/** \brief The coherence name. */
std::string coherence_name_;
/** \brief abstract method to calculate coherence.
* \param[in] source instance of source point.
* \param[in] target instance of target point.
*/
virtual double
computeCoherence (PointInT &source, PointInT &target) = 0;
/** \brief Get a string representation of the name of this class. */
inline const std::string&
getClassName () const { return (coherence_name_); }
};
/** \brief @b PointCloudCoherence is a base class to compute coherence between the two PointClouds.
* \author Ryohei Ueda
* \ingroup tracking
*/
template <typename PointInT>
class PointCloudCoherence
{
public:
typedef boost::shared_ptr< PointCloudCoherence<PointInT> > Ptr;
typedef boost::shared_ptr< const PointCloudCoherence<PointInT> > ConstPtr;
typedef pcl::PointCloud<PointInT> PointCloudIn;
typedef typename PointCloudIn::Ptr PointCloudInPtr;
typedef typename PointCloudIn::ConstPtr PointCloudInConstPtr;
typedef typename PointCoherence<PointInT>::Ptr PointCoherencePtr;
/** \brief Constructor. */
PointCloudCoherence () : coherence_name_ (), target_input_ (), point_coherences_ () {}
/** \brief Destructor. */
virtual ~PointCloudCoherence () {}
/** \brief compute coherence between two pointclouds. */
inline void
compute (const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices,
float &w_i);
/** \brief get a list of pcl::tracking::PointCoherence.*/
inline std::vector<PointCoherencePtr>
getPointCoherences () { return point_coherences_; }
/** \brief set a list of pcl::tracking::PointCoherence.
* \param coherences a list of pcl::tracking::PointCoherence.
*/
inline void
setPointCoherences (std::vector<PointCoherencePtr> coherences) { point_coherences_ = coherences; }
/** \brief This method should get called before starting the actual computation. */
virtual bool initCompute ();
/** \brief add a PointCoherence to the PointCloudCoherence.
* \param coherence a pointer to PointCoherence.
*/
inline void
addPointCoherence (PointCoherencePtr coherence) { point_coherences_.push_back (coherence); }
/** \brief add a PointCoherence to the PointCloudCoherence.
* \param cloud a pointer to PointCoherence.
*/
virtual inline void
setTargetCloud (const PointCloudInConstPtr &cloud) { target_input_ = cloud; }
protected:
/** \brief Abstract method to compute coherence. */
virtual void
computeCoherence (const PointCloudInConstPtr &cloud, const IndicesConstPtr &indices, float &w_j) = 0;
inline double calcPointCoherence (PointInT &source, PointInT &target);
/** \brief Get a string representation of the name of this class. */
inline const std::string&
getClassName () const { return (coherence_name_); }
/** \brief The coherence name. */
std::string coherence_name_;
/** \brief a pointer to target point cloud*/
PointCloudInConstPtr target_input_;
/** \brief a list of pointers to PointCoherence.*/
std::vector<PointCoherencePtr> point_coherences_;
};
}
}
#include <pcl/tracking/impl/coherence.hpp>
#endif
|