Point Cloud Library (PCL)  1.9.1
kld_adaptive_particle_filter_omp.h
1 #ifndef PCL_TRACKING_KLD_ADAPTIVE_PARTICLE_FILTER_OMP_H_
2 #define PCL_TRACKING_KLD_ADAPTIVE_PARTICLE_FILTER_OMP_H_
3 
4 #include <pcl/tracking/tracking.h>
5 #include <pcl/tracking/kld_adaptive_particle_filter.h>
6 #include <pcl/tracking/coherence.h>
7 
8 namespace pcl
9 {
10  namespace tracking
11  {
12  /** \brief @b KLDAdaptiveParticleFilterOMPTracker tracks the PointCloud which is given by
13  setReferenceCloud within the measured PointCloud using particle filter method.
14  The number of the particles changes adaptively based on KLD sampling [D. Fox, NIPS-01], [D.Fox, IJRR03].
15  and the computation of the weights of the particles is parallelized using OpenMP.
16  * \author Ryohei Ueda
17  * \ingroup tracking
18  */
19  template <typename PointInT, typename StateT>
21  {
22  public:
43  //using KLDAdaptiveParticleFilterTracker<PointInT, StateT>::calcLikelihood;
47 
49 
53 
57 
59  typedef boost::shared_ptr< Coherence > CoherencePtr;
60  typedef boost::shared_ptr< const Coherence > CoherenceConstPtr;
61 
63  typedef boost::shared_ptr< CloudCoherence > CloudCoherencePtr;
64  typedef boost::shared_ptr< const CloudCoherence > CloudCoherenceConstPtr;
65 
66  /** \brief Initialize the scheduler and set the number of threads to use.
67  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
68  */
69  KLDAdaptiveParticleFilterOMPTracker (unsigned int nr_threads = 0)
70  : KLDAdaptiveParticleFilterTracker<PointInT, StateT> ()
71  {
72  tracker_name_ = "KLDAdaptiveParticleFilterOMPTracker";
73 
74  setNumberOfThreads(nr_threads);
75  }
76 
77  /** \brief Initialize the scheduler and set the number of threads to use.
78  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
79  */
80  void
81  setNumberOfThreads (unsigned int nr_threads = 0);
82 
83  protected:
84  /** \brief The number of threads the scheduler should use. */
85  unsigned int threads_;
86 
87  /** \brief weighting phase of particle filter method.
88  calculate the likelihood of all of the particles and set the weights.
89  */
90  virtual void weight ();
91 
92  };
93  }
94 }
95 
96 //#include <pcl/tracking/impl/particle_filter_omp.hpp>
97 #ifdef PCL_NO_PRECOMPILE
98 #include <pcl/tracking/impl/kld_adaptive_particle_filter_omp.hpp>
99 #endif
100 
101 #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::KLDAdaptiveParticleFilterOMPTracker::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition: kld_adaptive_particle_filter_omp.h:85
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudInConstPtr
PointCloudIn::ConstPtr PointCloudInConstPtr
Definition: kld_adaptive_particle_filter_omp.h:52
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudIn
Tracker< PointInT, StateT >::PointCloudIn PointCloudIn
Definition: kld_adaptive_particle_filter_omp.h:50
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudInPtr
PointCloudIn::Ptr PointCloudInPtr
Definition: kld_adaptive_particle_filter_omp.h:51
pcl::PointCloud< PointInT >
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::CoherencePtr
boost::shared_ptr< Coherence > CoherencePtr
Definition: kld_adaptive_particle_filter_omp.h:59
pcl::tracking::Tracker::tracker_name_
std::string tracker_name_
The tracker name.
Definition: tracker.h:92
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::Coherence
PointCoherence< PointInT > Coherence
Definition: kld_adaptive_particle_filter_omp.h:58
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::setNumberOfThreads
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition: kld_adaptive_particle_filter_omp.hpp:8
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::CloudCoherenceConstPtr
boost::shared_ptr< const CloudCoherence > CloudCoherenceConstPtr
Definition: kld_adaptive_particle_filter_omp.h:64
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::CloudCoherencePtr
boost::shared_ptr< CloudCoherence > CloudCoherencePtr
Definition: kld_adaptive_particle_filter_omp.h:63
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudState
Tracker< PointInT, StateT >::PointCloudState PointCloudState
Definition: kld_adaptive_particle_filter_omp.h:54
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudStatePtr
PointCloudState::Ptr PointCloudStatePtr
Definition: kld_adaptive_particle_filter_omp.h:55
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker
KLDAdaptiveParticleFilterOMPTracker tracks the PointCloud which is given by setReferenceCloud within ...
Definition: kld_adaptive_particle_filter_omp.h:20
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::BaseClass
Tracker< PointInT, StateT > BaseClass
Definition: kld_adaptive_particle_filter_omp.h:48
pcl::PointCloud< PointInT >::ConstPtr
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:429
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::KLDAdaptiveParticleFilterOMPTracker::CloudCoherence
PointCloudCoherence< PointInT > CloudCoherence
Definition: kld_adaptive_particle_filter_omp.h:62
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::CoherenceConstPtr
boost::shared_ptr< const Coherence > CoherenceConstPtr
Definition: kld_adaptive_particle_filter_omp.h:60
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::KLDAdaptiveParticleFilterOMPTracker
KLDAdaptiveParticleFilterOMPTracker(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition: kld_adaptive_particle_filter_omp.h:69
pcl::tracking::Tracker
Tracker represents the base tracker class.
Definition: tracker.h:56
pcl::tracking::KLDAdaptiveParticleFilterTracker
KLDAdaptiveParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the...
Definition: kld_adaptive_particle_filter.h:20
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::PointCloudStateConstPtr
PointCloudState::ConstPtr PointCloudStateConstPtr
Definition: kld_adaptive_particle_filter_omp.h:56
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker::weight
virtual void weight()
weighting phase of particle filter method.
Definition: kld_adaptive_particle_filter_omp.hpp:22