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
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::PointCloud< PointInT >::Ptr
boost::shared_ptr< PointCloud< PointInT > > Ptr
Definition: point_cloud.h:428
pcl::tracking::ParticleFilterOMPTracker::PointCloudState
Tracker< PointInT, StateT >::PointCloudState PointCloudState
Definition: particle_filter_omp.h:50
pcl::tracking::ParticleFilterTracker
ParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the measured P...
Definition: particle_filter.h:22
pcl::tracking::ParticleFilterOMPTracker::CloudCoherencePtr
boost::shared_ptr< CloudCoherence > CloudCoherencePtr
Definition: particle_filter_omp.h:59
pcl::tracking::ParticleFilterOMPTracker::CloudCoherence
PointCloudCoherence< PointInT > CloudCoherence
Definition: particle_filter_omp.h:58
pcl::tracking::ParticleFilterOMPTracker::CoherenceConstPtr
boost::shared_ptr< const Coherence > CoherenceConstPtr
Definition: particle_filter_omp.h:56
pcl::tracking::ParticleFilterOMPTracker::PointCloudInConstPtr
PointCloudIn::ConstPtr PointCloudInConstPtr
Definition: particle_filter_omp.h:48
pcl::tracking::ParticleFilterOMPTracker::Coherence
PointCoherence< PointInT > Coherence
Definition: particle_filter_omp.h:54
pcl::tracking::ParticleFilterOMPTracker::PointCloudIn
Tracker< PointInT, StateT >::PointCloudIn PointCloudIn
Definition: particle_filter_omp.h:46
pcl::tracking::ParticleFilterOMPTracker::CloudCoherenceConstPtr
boost::shared_ptr< const CloudCoherence > CloudCoherenceConstPtr
Definition: particle_filter_omp.h:60
pcl::tracking::ParticleFilterOMPTracker
ParticleFilterOMPTracker tracks the PointCloud which is given by setReferenceCloud within the measure...
Definition: particle_filter_omp.h:19
pcl::PointCloud< PointInT >
pcl::tracking::ParticleFilterOMPTracker::BaseClass
Tracker< PointInT, StateT > BaseClass
Definition: particle_filter_omp.h:44
pcl::tracking::ParticleFilterOMPTracker::PointCloudInPtr
PointCloudIn::Ptr PointCloudInPtr
Definition: particle_filter_omp.h:47
pcl::tracking::Tracker::tracker_name_
std::string tracker_name_
The tracker name.
Definition: tracker.h:92
pcl::tracking::ParticleFilterOMPTracker::setNumberOfThreads
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition: particle_filter_omp.hpp:8
pcl::tracking::ParticleFilterOMPTracker::weight
virtual void weight()
weighting phase of particle filter method.
Definition: particle_filter_omp.hpp:22
pcl::PointCloud< PointInT >::ConstPtr
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:429
pcl::tracking::ParticleFilterOMPTracker::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition: particle_filter_omp.h:81
pcl::tracking::PointCloudCoherence
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
Definition: coherence.h:60
pcl::tracking::PointCoherence
PointCoherence is a base class to compute coherence between the two points.
Definition: coherence.h:17
pcl::tracking::ParticleFilterOMPTracker::CoherencePtr
boost::shared_ptr< Coherence > CoherencePtr
Definition: particle_filter_omp.h:55
pcl::tracking::ParticleFilterOMPTracker::PointCloudStatePtr
PointCloudState::Ptr PointCloudStatePtr
Definition: particle_filter_omp.h:51
pcl::tracking::ParticleFilterOMPTracker::ParticleFilterOMPTracker
ParticleFilterOMPTracker(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition: particle_filter_omp.h:65
pcl::tracking::ParticleFilterOMPTracker::PointCloudStateConstPtr
PointCloudState::ConstPtr PointCloudStateConstPtr
Definition: particle_filter_omp.h:52
pcl::tracking::Tracker
Tracker represents the base tracker class.
Definition: tracker.h:56