Point Cloud Library (PCL)
1.3.1
|
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 3023 2011-11-01 03:42:32Z svn $ 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 00070 00073 NormalBasedSignatureEstimation () 00074 : FeatureFromNormals<PointT, PointNT, PointFeature> (), 00075 N_ (36), 00076 M_ (8), 00077 N_prime_ (4), 00078 M_prime_ (3) 00079 { 00080 } 00081 00085 inline void 00086 setN (size_t n) { N_ = n; } 00087 00089 inline size_t 00090 getN () { return N_; } 00091 00095 inline void 00096 setM (size_t m) { M_ = m; } 00097 00099 inline size_t 00100 getM () { return M_; } 00101 00107 inline void 00108 setNPrime (size_t n_prime) { N_prime_ = n_prime; } 00109 00114 inline size_t 00115 getNPrime () { return N_prime_; } 00116 00122 inline void 00123 setMPrime (size_t m_prime) { M_prime_ = m_prime; } 00124 00129 inline size_t 00130 getMPrime () { return M_prime_; } 00131 00135 inline void 00136 setScale (float scale) { scale_h_ = scale; } 00137 00141 inline float 00142 getScale () { return scale_h_; } 00143 00144 00145 protected: 00146 void 00147 computeFeature (FeatureCloud &output); 00148 00149 private: 00150 float scale_h_; 00151 size_t N_, M_, N_prime_, M_prime_; 00152 }; 00153 } 00154 00155 #endif /* PCL_NORMAL_BASED_SIGNATURE_H_ */