normal_based_signature.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Copyright (c) 2011, Alexandru-Eugen Ichim
00005  *                      Willow Garage, Inc
00006  *  All rights reserved.
00007  *
00008  *  Redistribution and use in source and binary forms, with or without
00009  *  modification, are permitted provided that the following conditions
00010  *  are met:
00011  *
00012  *   * Redistributions of source code must retain the above copyright
00013  *     notice, this list of conditions and the following disclaimer.
00014  *   * Redistributions in binary form must reproduce the above
00015  *     copyright notice, this list of conditions and the following
00016  *     disclaimer in the documentation and/or other materials provided
00017  *     with the distribution.
00018  *   * Neither the name of Willow Garage, Inc. nor the names of its
00019  *     contributors may be used to endorse or promote products derived
00020  *     from this software without specific prior written permission.
00021  *
00022  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00026  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00028  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00029  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00030  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00031  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00032  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00033  *  POSSIBILITY OF SUCH DAMAGE.
00034  *
00035  *  $Id: normal_based_signature.h 6144 2012-07-04 22:06:28Z rusu $
00036  */
00037 
00038 #ifndef PCL_NORMAL_BASED_SIGNATURE_H_
00039 #define PCL_NORMAL_BASED_SIGNATURE_H_
00040 
00041 #include <pcl/features/feature.h>
00042 
00043 namespace pcl
00044 {
00058   template <typename PointT, typename PointNT, typename PointFeature>
00059   class NormalBasedSignatureEstimation : public FeatureFromNormals<PointT, PointNT, PointFeature>
00060   {
00061     public:
00062       using Feature<PointT, PointFeature>::input_;
00063       using Feature<PointT, PointFeature>::tree_;
00064       using Feature<PointT, PointFeature>::search_radius_;
00065       using PCLBase<PointT>::indices_;
00066       using FeatureFromNormals<PointT, PointNT, PointFeature>::normals_;
00067 
00068       typedef pcl::PointCloud<PointFeature> FeatureCloud;
00069       typedef typename boost::shared_ptr<NormalBasedSignatureEstimation<PointT, PointNT, PointFeature> > Ptr;
00070       typedef typename boost::shared_ptr<const NormalBasedSignatureEstimation<PointT, PointNT, PointFeature> > ConstPtr;
00071 
00072 
00073 
00076       NormalBasedSignatureEstimation ()
00077         : FeatureFromNormals<PointT, PointNT, PointFeature> (),
00078           scale_h_ (),
00079           N_ (36),
00080           M_ (8),
00081           N_prime_ (4),
00082           M_prime_ (3)
00083       {
00084       }
00085 
00089       inline void
00090       setN (size_t n) { N_ = n; }
00091 
00093       inline size_t
00094       getN () { return N_; }
00095 
00099       inline void
00100       setM (size_t m) { M_ = m; }
00101 
00103       inline size_t
00104       getM () { return M_; }
00105 
00111       inline void
00112       setNPrime (size_t n_prime) { N_prime_ = n_prime; }
00113 
00118       inline size_t
00119       getNPrime () { return N_prime_; }
00120 
00126       inline void
00127       setMPrime (size_t m_prime) { M_prime_ = m_prime; }
00128 
00133       inline size_t
00134       getMPrime () { return M_prime_; }
00135 
00139       inline void
00140       setScale (float scale) { scale_h_ = scale; }
00141 
00145       inline float
00146       getScale () { return scale_h_; }
00147 
00148 
00149     protected:
00150       void
00151       computeFeature (FeatureCloud &output);
00152 
00153     private:
00154       float scale_h_;
00155       size_t N_, M_, N_prime_, M_prime_;
00156 
00160       void 
00161       computeFeatureEigen (pcl::PointCloud<Eigen::MatrixXf> &) {}
00162   };
00163 }
00164 
00165 #endif /* PCL_NORMAL_BASED_SIGNATURE_H_ */


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:15:51