1 #ifndef PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_OMP_FILTER_H_
2 #define PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_OMP_FILTER_H_
4 #include <pcl/tracking/kld_adaptive_particle_filter_omp.h>
7 template <
typename Po
intInT,
typename StateT>
void
12 threads_ = omp_get_num_procs();
17 threads_ = nr_threads;
21 template <
typename Po
intInT,
typename StateT>
void
27 #pragma omp parallel for num_threads(threads_)
29 for (
int i = 0; i < particle_num_; i++)
30 this->computeTransformedPointCloudWithoutNormal (particles_->points[i], *transed_reference_vector_[i]);
33 this->cropInputPointCloud (input_, *coherence_input);
34 if (change_counter_ == 0)
37 if (!use_change_detector_ || this->testChangeDetection (coherence_input))
40 change_counter_ = change_detector_interval_;
41 coherence_->setTargetCloud (coherence_input);
42 coherence_->initCompute ();
44 #pragma omp parallel for num_threads(threads_)
46 for (
int i = 0; i < particle_num_; i++)
49 coherence_->compute (transed_reference_vector_[i], indices, particles_->points[i].weight);
58 coherence_->setTargetCloud (coherence_input);
59 coherence_->initCompute ();
61 #pragma omp parallel for num_threads(threads_)
63 for (
int i = 0; i < particle_num_; i++)
66 coherence_->compute (transed_reference_vector_[i], indices, particles_->points[i].weight);
72 std::vector<IndicesPtr> indices_list (particle_num_);
73 for (
int i = 0; i < particle_num_; i++)
75 indices_list[i] =
IndicesPtr (
new std::vector<int>);
78 #pragma omp parallel for num_threads(threads_)
80 for (
int i = 0; i < particle_num_; i++)
82 this->computeTransformedPointCloudWithNormal (particles_->points[i], *indices_list[i], *transed_reference_vector_[i]);
86 this->cropInputPointCloud (input_, *coherence_input);
88 coherence_->setTargetCloud (coherence_input);
89 coherence_->initCompute ();
91 #pragma omp parallel for num_threads(threads_)
93 for (
int i = 0; i < particle_num_; i++)
95 coherence_->compute (transed_reference_vector_[i], indices_list[i], particles_->points[i].weight);
102 #define PCL_INSTANTIATE_KLDAdaptiveParticleFilterOMPTracker(T,ST) template class PCL_EXPORTS pcl::tracking::KLDAdaptiveParticleFilterOMPTracker<T,ST>;