1 #ifndef PCL_TRACKING_IMPL_PARTICLE_OMP_FILTER_H_
2 #define PCL_TRACKING_IMPL_PARTICLE_OMP_FILTER_H_
4 #include <pcl/tracking/particle_filter_omp.h>
6 template <
typename Po
intInT,
typename StateT>
void
12 #pragma omp parallel for num_threads(threads_)
14 for (
int i = 0; i < particle_num_; i++)
15 this->computeTransformedPointCloudWithoutNormal (particles_->points[i], *transed_reference_vector_[i]);
18 this->cropInputPointCloud (input_, *coherence_input);
19 if (change_counter_ == 0)
22 if (!use_change_detector_ || this->testChangeDetection (coherence_input))
25 change_counter_ = change_detector_interval_;
26 coherence_->setTargetCloud (coherence_input);
27 coherence_->initCompute ();
29 #pragma omp parallel for num_threads(threads_)
31 for (
int i = 0; i < particle_num_; i++)
34 coherence_->compute (transed_reference_vector_[i], indices, particles_->points[i].weight);
43 coherence_->setTargetCloud (coherence_input);
44 coherence_->initCompute ();
46 #pragma omp parallel for num_threads(threads_)
48 for (
int i = 0; i < particle_num_; i++)
51 coherence_->compute (transed_reference_vector_[i], indices, particles_->points[i].weight);
57 std::vector<IndicesPtr> indices_list (particle_num_);
58 for (
int i = 0; i < particle_num_; i++)
60 indices_list[i] =
IndicesPtr (
new std::vector<int>);
63 #pragma omp parallel for num_threads(threads_)
65 for (
int i = 0; i < particle_num_; i++)
67 this->computeTransformedPointCloudWithNormal (particles_->points[i], *indices_list[i], *transed_reference_vector_[i]);
71 this->cropInputPointCloud (input_, *coherence_input);
73 coherence_->setTargetCloud (coherence_input);
74 coherence_->initCompute ();
76 #pragma omp parallel for num_threads(threads_)
78 for (
int i = 0; i < particle_num_; i++)
80 coherence_->compute (transed_reference_vector_[i], indices_list[i], particles_->points[i].weight);
87 #define PCL_INSTANTIATE_ParticleFilterOMPTracker(T,ST) template class PCL_EXPORTS pcl::tracking::ParticleFilterOMPTracker<T,ST>;
PointCloudIn::Ptr PointCloudInPtr
virtual void weight()
weighting phase of particle filter method.
boost::shared_ptr< std::vector< int > > IndicesPtr