particle_filter_omp.h
#pragma once
#include <pcl/tracking/tracking.h>
#include <pcl/tracking/particle_filter.h>
#include <pcl/tracking/coherence.h>
namespace pcl
{
namespace tracking
{
/** \brief @b ParticleFilterOMPTracker tracks the PointCloud which is given by
setReferenceCloud within the measured PointCloud using particle filter method
in parallel, using the OpenMP standard.
* \author Ryohei Ueda
* \ingroup tracking
*/
template <typename PointInT, typename StateT>
class ParticleFilterOMPTracker: public ParticleFilterTracker<PointInT, StateT>
{
public:
using Tracker<PointInT, StateT>::tracker_name_;
using Tracker<PointInT, StateT>::search_;
using Tracker<PointInT, StateT>::input_;
using Tracker<PointInT, StateT>::indices_;
using Tracker<PointInT, StateT>::getClassName;
using ParticleFilterTracker<PointInT, StateT>::particles_;
using ParticleFilterTracker<PointInT, StateT>::change_detector_;
using ParticleFilterTracker<PointInT, StateT>::change_counter_;
using ParticleFilterTracker<PointInT, StateT>::change_detector_interval_;
using ParticleFilterTracker<PointInT, StateT>::use_change_detector_;
using ParticleFilterTracker<PointInT, StateT>::alpha_;
using ParticleFilterTracker<PointInT, StateT>::changed_;
using ParticleFilterTracker<PointInT, StateT>::coherence_;
using ParticleFilterTracker<PointInT, StateT>::use_normal_;
using ParticleFilterTracker<PointInT, StateT>::particle_num_;
using ParticleFilterTracker<PointInT, StateT>::change_detector_filter_;
using ParticleFilterTracker<PointInT, StateT>::transed_reference_vector_;
//using ParticleFilterTracker<PointInT, StateT>::calcLikelihood;
using ParticleFilterTracker<PointInT, StateT>::normalizeWeight;
using ParticleFilterTracker<PointInT, StateT>::normalizeParticleWeight;
using ParticleFilterTracker<PointInT, StateT>::calcBoundingBox;
using BaseClass = Tracker<PointInT, StateT>;
using PointCloudIn = typename Tracker<PointInT, StateT>::PointCloudIn;
using PointCloudInPtr = typename PointCloudIn::Ptr;
using PointCloudInConstPtr = typename PointCloudIn::ConstPtr;
using PointCloudState = typename Tracker<PointInT, StateT>::PointCloudState;
using PointCloudStatePtr = typename PointCloudState::Ptr;
using PointCloudStateConstPtr = typename PointCloudState::ConstPtr;
using Coherence = PointCoherence<PointInT>;
using CoherencePtr = typename Coherence::Ptr;
using CoherenceConstPtr = typename Coherence::ConstPtr;
using CloudCoherence = PointCloudCoherence<PointInT>;
using CloudCoherencePtr = typename CloudCoherence::Ptr;
using CloudCoherenceConstPtr = typename CloudCoherence::ConstPtr;
/** \brief Initialize the scheduler and set the number of threads to use.
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
*/
ParticleFilterOMPTracker (unsigned int nr_threads = 0)
: ParticleFilterTracker<PointInT, StateT> ()
{
tracker_name_ = "ParticleFilterOMPTracker";
setNumberOfThreads(nr_threads);
}
/** \brief Initialize the scheduler and set the number of threads to use.
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
*/
void
setNumberOfThreads (unsigned int nr_threads = 0);
protected:
/** \brief The number of threads the scheduler should use. */
unsigned int threads_;
/** \brief weighting phase of particle filter method.
calculate the likelihood of all of the particles and set the weights.
*/
void weight () override;
};
}
}
//#include <pcl/tracking/impl/particle_filter_omp.hpp>
#ifdef PCL_NO_PRECOMPILE
#include <pcl/tracking/impl/particle_filter_omp.hpp>
#endif
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::tracking::ParticleFilterTracker
ParticleFilterTracker tracks the PointCloud which is given by setReferenceCloud within the measured P...
Definition: particle_filter.h:23
pcl::tracking::PointCloudCoherence::ConstPtr
shared_ptr< const PointCloudCoherence< PointInT > > ConstPtr
Definition: coherence.h:63
pcl::tracking::ParticleFilterTracker::CloudCoherenceConstPtr
typename CloudCoherence::ConstPtr CloudCoherenceConstPtr
Definition: particle_filter.h:54
pcl::tracking::PointCoherence::Ptr
shared_ptr< PointCoherence< PointInT > > Ptr
Definition: coherence.h:19
pcl::tracking::ParticleFilterOMPTracker
ParticleFilterOMPTracker tracks the PointCloud which is given by setReferenceCloud within the measure...
Definition: particle_filter_omp.h:18
pcl::PointCloud< PointInT >
pcl::tracking::Tracker::tracker_name_
std::string tracker_name_
The tracker name.
Definition: tracker.h:92
pcl::tracking::ParticleFilterTracker::PointCloudIn
typename Tracker< PointInT, StateT >::PointCloudIn PointCloudIn
Definition: particle_filter.h:40
pcl::tracking::PointCoherence::ConstPtr
shared_ptr< const PointCoherence< PointInT > > ConstPtr
Definition: coherence.h:20
pcl::tracking::ParticleFilterTracker::CloudCoherencePtr
typename CloudCoherence::Ptr CloudCoherencePtr
Definition: particle_filter.h:53
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::ParticleFilterTracker::PointCloudInConstPtr
typename PointCloudIn::ConstPtr PointCloudInConstPtr
Definition: particle_filter.h:42
pcl::tracking::ParticleFilterTracker::PointCloudState
typename Tracker< PointInT, StateT >::PointCloudState PointCloudState
Definition: particle_filter.h:44
pcl::tracking::ParticleFilterTracker::PointCloudInPtr
typename PointCloudIn::Ptr PointCloudInPtr
Definition: particle_filter.h:41
pcl::tracking::ParticleFilterTracker::CoherencePtr
typename Coherence::Ptr CoherencePtr
Definition: particle_filter.h:49
pcl::tracking::ParticleFilterOMPTracker::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition: particle_filter_omp.h:80
pcl::tracking::PointCloudCoherence
PointCloudCoherence is a base class to compute coherence between the two PointClouds.
Definition: coherence.h:59
pcl::tracking::PointCoherence
PointCoherence is a base class to compute coherence between the two points.
Definition: coherence.h:16
pcl::tracking::ParticleFilterTracker::CoherenceConstPtr
typename Coherence::ConstPtr CoherenceConstPtr
Definition: particle_filter.h:50
pcl::tracking::ParticleFilterOMPTracker::weight
void weight() override
weighting phase of particle filter method.
Definition: particle_filter_omp.hpp:22
pcl::tracking::PointCloudCoherence::Ptr
shared_ptr< PointCloudCoherence< PointInT > > Ptr
Definition: coherence.h:62
pcl::tracking::ParticleFilterTracker::PointCloudStatePtr
typename PointCloudState::Ptr PointCloudStatePtr
Definition: particle_filter.h:45
pcl::tracking::ParticleFilterTracker::PointCloudStateConstPtr
typename PointCloudState::ConstPtr PointCloudStateConstPtr
Definition: particle_filter.h:46
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:64
pcl::tracking::Tracker
Tracker represents the base tracker class.
Definition: tracker.h:56