Point Cloud Library (PCL)  1.11.1
tracker.hpp
1 #ifndef PCL_TRACKING_IMPL_TRACKER_H_
2 #define PCL_TRACKING_IMPL_TRACKER_H_
3 
4 #include <pcl/common/eigen.h>
5 #include <pcl/tracking/tracker.h>
6 
7 #include <ctime>
8 
9 namespace pcl {
10 namespace tracking {
11 template <typename PointInT, typename StateT>
12 bool
14 {
16  PCL_ERROR("[pcl::%s::initCompute] PCLBase::Init failed.\n", getClassName().c_str());
17  return (false);
18  }
19 
20  // If the dataset is empty, just return
21  if (input_->points.empty()) {
22  PCL_ERROR("[pcl::%s::compute] input_ is empty!\n", getClassName().c_str());
23  // Cleanup
24  deinitCompute();
25  return (false);
26  }
27 
28  return (true);
29 }
30 
31 template <typename PointInT, typename StateT>
32 void
34 {
35  if (!initCompute())
36  return;
37 
38  computeTracking();
39  deinitCompute();
40 }
41 } // namespace tracking
42 } // namespace pcl
43 
44 #endif
virtual bool initCompute()
This method should get called before starting the actual computation.
Definition: tracker.hpp:13
PCL base class.
Definition: pcl_base.h:72
void compute()
Base method for tracking for all points given in <setInputCloud (), setIndices ()> using the indices ...
Definition: tracker.hpp:33