fpfh_omp.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Point Cloud Library (PCL) - www.pointclouds.org
00005  *  Copyright (c) 2009, Willow Garage, Inc.
00006  *  Copyright (c) 2012-, Open Perception, Inc.
00007  *
00008  *  All rights reserved.
00009  *
00010  *  Redistribution and use in source and binary forms, with or without
00011  *  modification, are permitted provided that the following conditions
00012  *  are met:
00013  *
00014  *   * Redistributions of source code must retain the above copyright
00015  *     notice, this list of conditions and the following disclaimer.
00016  *   * Redistributions in binary form must reproduce the above
00017  *     copyright notice, this list of conditions and the following
00018  *     disclaimer in the documentation and/or other materials provided
00019  *     with the distribution.
00020  *   * Neither the name of the copyright holder(s) nor the names of its
00021  *     contributors may be used to endorse or promote products derived
00022  *     from this software without specific prior written permission.
00023  *
00024  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00026  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00027  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00028  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00029  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00030  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00031  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00032  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00033  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00034  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00035  *  POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  * $Id$
00038  *
00039  */
00040 
00041 #ifndef PCL_FPFH_OMP_H_
00042 #define PCL_FPFH_OMP_H_
00043 
00044 #include <pcl/features/feature.h>
00045 #include <pcl/features/fpfh.h>
00046 
00047 namespace pcl
00048 {
00074   template <typename PointInT, typename PointNT, typename PointOutT>
00075   class FPFHEstimationOMP : public FPFHEstimation<PointInT, PointNT, PointOutT>
00076   {
00077     public:
00078       typedef boost::shared_ptr<FPFHEstimationOMP<PointInT, PointNT, PointOutT> > Ptr;
00079       typedef boost::shared_ptr<const FPFHEstimationOMP<PointInT, PointNT, PointOutT> > ConstPtr;
00080       using Feature<PointInT, PointOutT>::feature_name_;
00081       using Feature<PointInT, PointOutT>::getClassName;
00082       using Feature<PointInT, PointOutT>::indices_;
00083       using Feature<PointInT, PointOutT>::k_;
00084       using Feature<PointInT, PointOutT>::search_parameter_;
00085       using Feature<PointInT, PointOutT>::input_;
00086       using Feature<PointInT, PointOutT>::surface_;
00087       using FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_;
00088       using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f1_;
00089       using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f2_;
00090       using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f3_;
00091       using FPFHEstimation<PointInT, PointNT, PointOutT>::weightPointSPFHSignature;
00092 
00093       typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00094 
00098       FPFHEstimationOMP (unsigned int nr_threads = 0) : nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11), threads_ (nr_threads)
00099       {
00100         feature_name_ = "FPFHEstimationOMP";
00101       }
00102 
00106       inline void 
00107       setNumberOfThreads (unsigned int nr_threads = 0) { threads_ = nr_threads; }
00108 
00109     private:
00115       void 
00116       computeFeature (PointCloudOut &output);
00117 
00118     public:
00120       int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_;
00121     private:
00123       unsigned int threads_;
00124   };
00125 }
00126 
00127 #ifdef PCL_NO_PRECOMPILE
00128 #include <pcl/features/impl/fpfh_omp.hpp>
00129 #endif
00130 
00131 #endif  //#ifndef PCL_FPFH_OMP_H_


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:24:14