Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef PCL_INTENSITY_SPIN_H_
00040 #define PCL_INTENSITY_SPIN_H_
00041
00042 #include <pcl/features/feature.h>
00043
00044 namespace pcl
00045 {
00056 template <typename PointInT, typename PointOutT>
00057 class IntensitySpinEstimation: public Feature<PointInT, PointOutT>
00058 {
00059 public:
00060 using Feature<PointInT, PointOutT>::feature_name_;
00061 using Feature<PointInT, PointOutT>::getClassName;
00062
00063 using Feature<PointInT, PointOutT>::input_;
00064 using Feature<PointInT, PointOutT>::indices_;
00065 using Feature<PointInT, PointOutT>::surface_;
00066
00067 using Feature<PointInT, PointOutT>::tree_;
00068 using Feature<PointInT, PointOutT>::search_radius_;
00069
00070 typedef typename pcl::PointCloud<PointInT> PointCloudIn;
00071 typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00072
00074 IntensitySpinEstimation () : nr_distance_bins_ (4), nr_intensity_bins_ (5), sigma_ (1.0)
00075 {
00076 feature_name_ = "IntensitySpinEstimation";
00077 };
00078
00089 void
00090 computeIntensitySpinImage (const PointCloudIn &cloud,
00091 float radius, float sigma, int k,
00092 const std::vector<int> &indices,
00093 const std::vector<float> &squared_distances,
00094 Eigen::MatrixXf &intensity_spin_image);
00095
00099 inline void
00100 setNrDistanceBins (size_t nr_distance_bins) { nr_distance_bins_ = static_cast<int> (nr_distance_bins); };
00101
00103 inline int
00104 getNrDistanceBins () { return (nr_distance_bins_); };
00105
00109 inline void
00110 setNrIntensityBins (size_t nr_intensity_bins) { nr_intensity_bins_ = static_cast<int> (nr_intensity_bins); };
00111
00113 inline int
00114 getNrIntensityBins () { return (nr_intensity_bins_); };
00115
00119 inline void
00120 setSmoothingBandwith (float sigma) { sigma_ = sigma; };
00121
00123 inline float
00124 getSmoothingBandwith () { return (sigma_); };
00125
00126
00131 void
00132 computeFeature (PointCloudOut &output);
00133
00135 int nr_distance_bins_;
00136
00138 int nr_intensity_bins_;
00139
00141 float sigma_;
00142
00143 private:
00147 void
00148 computeFeatureEigen (pcl::PointCloud<Eigen::MatrixXf> &) {}
00149 };
00150
00161 template <typename PointInT>
00162 class IntensitySpinEstimation<PointInT, Eigen::MatrixXf>: public IntensitySpinEstimation<PointInT, pcl::Histogram<20> >
00163 {
00164 public:
00165 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::getClassName;
00166 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::input_;
00167 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::indices_;
00168 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::surface_;
00169 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::search_radius_;
00170 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::nr_intensity_bins_;
00171 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::nr_distance_bins_;
00172 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::tree_;
00173 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::sigma_;
00174 using IntensitySpinEstimation<PointInT, pcl::Histogram<20> >::compute;
00175
00176 private:
00181 void
00182 computeFeatureEigen (pcl::PointCloud<Eigen::MatrixXf> &output);
00183
00187 void
00188 compute (pcl::PointCloud<pcl::Normal> &) {}
00189 };
00190 }
00191
00192 #endif // #ifndef PCL_INTENSITY_SPIN_H_