Point Cloud Library (PCL)  1.9.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
shot_lrf_omp.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2012, Willow Garage, Inc.
6  * Copyright (c) 2012-, Open Perception, Inc.
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * * Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  * * Neither the name of the copyright holder(s) nor the names of its
21  * contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  *
37  * $Id$
38  */
39 
40 #ifndef PCL_FEATURES_SHOT_LRF_OMP_H_
41 #define PCL_FEATURES_SHOT_LRF_OMP_H_
42 
43 #include <pcl/point_types.h>
44 #include <pcl/features/feature.h>
45 #include <pcl/features/shot_lrf.h>
46 
47 namespace pcl
48 {
49  /** \brief SHOTLocalReferenceFrameEstimation estimates the Local Reference Frame used in the calculation
50  * of the (SHOT) descriptor.
51  *
52  * \note If you use this code in any academic work, please cite:
53  *
54  * - F. Tombari, S. Salti, L. Di Stefano
55  * Unique Signatures of Histograms for Local Surface Description.
56  * In Proceedings of the 11th European Conference on Computer Vision (ECCV),
57  * Heraklion, Greece, September 5-11 2010.
58  * - F. Tombari, S. Salti, L. Di Stefano
59  * A Combined Texture-Shape Descriptor For Enhanced 3D Feature Matching.
60  * In Proceedings of the 18th International Conference on Image Processing (ICIP),
61  * Brussels, Belgium, September 11-14 2011.
62  *
63  * \author Samuele Salti, Federico Tombari
64  * \ingroup features
65  */
66  template<typename PointInT, typename PointOutT = ReferenceFrame>
68  {
69  public:
70  typedef boost::shared_ptr<SHOTLocalReferenceFrameEstimationOMP<PointInT, PointOutT> > Ptr;
71  typedef boost::shared_ptr<const SHOTLocalReferenceFrameEstimationOMP<PointInT, PointOutT> > ConstPtr;
72  /** \brief Constructor */
74  {
75  feature_name_ = "SHOTLocalReferenceFrameEstimationOMP";
76 
78  }
79 
80  /** \brief Empty destructor */
82 
83  /** \brief Initialize the scheduler and set the number of threads to use.
84  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
85  */
86  void
87  setNumberOfThreads (unsigned int nr_threads = 0);
88 
89  protected:
92  //using Feature<PointInT, PointOutT>::searchForNeighbors;
101 
102  /** \brief Feature estimation method.
103  * \param[out] output the resultant features
104  */
105  virtual void
106  computeFeature (PointCloudOut &output);
107 
108  /** \brief The number of threads the scheduler should use. */
109  unsigned int threads_;
110 
111  };
112 }
113 
114 #ifdef PCL_NO_PRECOMPILE
115 #include <pcl/features/impl/shot_lrf_omp.hpp>
116 #endif
117 
118 #endif // PCL_FEATURES_SHOT_LRF_H_
119 
virtual void computeFeature(PointCloudOut &output)
Feature estimation method.
std::string feature_name_
The feature name.
Definition: feature.h:222
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
Definition: shot_lrf_omp.h:99
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
SHOTLocalReferenceFrameEstimation estimates the Local Reference Frame used in the calculation of the ...
Definition: shot_lrf_omp.h:67
virtual ~SHOTLocalReferenceFrameEstimationOMP()
Empty destructor.
Definition: shot_lrf_omp.h:81
SHOTLocalReferenceFrameEstimation estimates the Local Reference Frame used in the calculation of the ...
Definition: shot_lrf.h:66
boost::shared_ptr< SHOTLocalReferenceFrameEstimationOMP< PointInT, PointOutT > > Ptr
Definition: shot_lrf_omp.h:70
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
Definition: shot_lrf_omp.h:100
boost::shared_ptr< const SHOTLocalReferenceFrameEstimationOMP< PointInT, PointOutT > > ConstPtr
Definition: shot_lrf_omp.h:71
Feature represents the base feature class.
Definition: feature.h:105
unsigned int threads_
The number of threads the scheduler should use.
Definition: shot_lrf_omp.h:109