Point Cloud Library (PCL)  1.9.1
particle_filter_omp.h
1 #ifndef PCL_TRACKING_PARTICLE_FILTER_OMP_H_
2 #define PCL_TRACKING_PARTICLE_FILTER_OMP_H_
3 
4 #include <pcl/tracking/tracking.h>
5 #include <pcl/tracking/particle_filter.h>
6 #include <pcl/tracking/coherence.h>
7 
8 namespace pcl
9 {
10  namespace tracking
11  {
12  /** \brief @b ParticleFilterOMPTracker tracks the PointCloud which is given by
13  setReferenceCloud within the measured PointCloud using particle filter method
14  in parallel, using the OpenMP standard.
15  * \author Ryohei Ueda
16  * \ingroup tracking
17  */
18  template <typename PointInT, typename StateT>
19  class ParticleFilterOMPTracker: public ParticleFilterTracker<PointInT, StateT>
20  {
21  public:
39  //using ParticleFilterTracker<PointInT, StateT>::calcLikelihood;
43 
45 
49 
53 
55  typedef boost::shared_ptr< Coherence > CoherencePtr;
56  typedef boost::shared_ptr< const Coherence > CoherenceConstPtr;
57 
59  typedef boost::shared_ptr< CloudCoherence > CloudCoherencePtr;
60  typedef boost::shared_ptr< const CloudCoherence > CloudCoherenceConstPtr;
61 
62  /** \brief Initialize the scheduler and set the number of threads to use.
63  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
64  */
65  ParticleFilterOMPTracker (unsigned int nr_threads = 0)
66  : ParticleFilterTracker<PointInT, StateT> ()
67  {
68  tracker_name_ = "ParticleFilterOMPTracker";
69 
70  setNumberOfThreads(nr_threads);
71  }
72 
73  /** \brief Initialize the scheduler and set the number of threads to use.
74  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
75  */
76  void
77  setNumberOfThreads (unsigned int nr_threads = 0);
78 
79  protected:
80  /** \brief The number of threads the scheduler should use. */
81  unsigned int threads_;
82 
83  /** \brief weighting phase of particle filter method.
84  calculate the likelihood of all of the particles and set the weights.
85  */
86  virtual void weight ();
87 
88  };
89  }
90 }
91 
92 //#include <pcl/tracking/impl/particle_filter_omp.hpp>
93 #ifdef PCL_NO_PRECOMPILE
94 #include <pcl/tracking/impl/particle_filter_omp.hpp>
95 #endif
96 
97 #endif
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
virtual void weight()
weighting phase of particle filter method.
PointCloudState::ConstPtr PointCloudStateConstPtr
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
boost::shared_ptr< Coherence > CoherencePtr
ParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the measured P...
boost::shared_ptr< const CloudCoherence > CloudCoherenceConstPtr
ParticleFilterOMPTracker(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
PointCloudCoherence< PointInT > CloudCoherence
boost::shared_ptr< PointCloud< PointInT > > Ptr
Definition: point_cloud.h:428
boost::shared_ptr< CloudCoherence > CloudCoherencePtr
PointCoherence is a base class to compute coherence between the two points.
Definition: coherence.h:17
boost::shared_ptr< const Coherence > CoherenceConstPtr
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:429
Tracker< PointInT, StateT >::PointCloudIn PointCloudIn
Tracker< PointInT, StateT >::PointCloudState PointCloudState
ParticleFilterOMPTracker tracks the PointCloud which is given by setReferenceCloud within the measure...
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
Definition: coherence.h:60
Tracker represents the base tracker class.
Definition: tracker.h:56
unsigned int threads_
The number of threads the scheduler should use.
std::string tracker_name_
The tracker name.
Definition: tracker.h:92