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 #ifndef PCL_INTENSITY_SPIN_H_
00038 #define PCL_INTENSITY_SPIN_H_
00039
00040 #include "pcl/features/feature.h"
00041
00042 namespace pcl
00043 {
00053 template <typename PointInT, typename PointOutT>
00054 class IntensitySpinEstimation: public Feature<PointInT, PointOutT>
00055 {
00056 public:
00057 using Feature<PointInT, PointOutT>::feature_name_;
00058 using Feature<PointInT, PointOutT>::getClassName;
00059
00060 using Feature<PointInT, PointOutT>::input_;
00061 using Feature<PointInT, PointOutT>::indices_;
00062 using Feature<PointInT, PointOutT>::surface_;
00063
00064 using Feature<PointInT, PointOutT>::tree_;
00065 using Feature<PointInT, PointOutT>::search_radius_;
00066
00067 typedef typename pcl::PointCloud<PointInT> PointCloudIn;
00068 typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00069
00071 IntensitySpinEstimation () : nr_distance_bins_ (4), nr_intensity_bins_ (5), sigma_ (1.0)
00072 {
00073 feature_name_ = "IntensitySpinEstimation";
00074 };
00075
00086 void computeIntensitySpinImage (
00087 const PointCloudIn &cloud, float radius, float sigma, int k, const std::vector<int> &indices,
00088 const std::vector<float> &squared_distances, Eigen::MatrixXf &intensity_spin_image);
00089
00093 inline void setNrDistanceBins (size_t nr_distance_bins) { nr_distance_bins_ = (int) nr_distance_bins; };
00094
00096 inline int getNrDistanceBins () { return (nr_distance_bins_); };
00097
00101 inline void setNrIntensityBins (size_t nr_intensity_bins) { nr_intensity_bins_ = (int) nr_intensity_bins; };
00102
00104 inline int getNrIntensityBins () { return (nr_intensity_bins_); };
00105
00109 inline void setSmoothingBandwith (float sigma) { sigma_ = sigma; };
00110
00112 inline float getSmoothingBandwith () { return (sigma_); };
00113
00114 protected:
00115
00120 void computeFeature (PointCloudOut &output);
00121
00122 private:
00123
00125 int nr_distance_bins_;
00126
00128 int nr_intensity_bins_;
00129
00131 float sigma_;
00132 };
00133 }
00134
00135 #endif // #ifndef PCL_INTENSITY_SPIN_H_