41 #ifndef PCL_PYRAMID_FEATURE_MATCHING_H_
42 #define PCL_PYRAMID_FEATURE_MATCHING_H_
44 #include <pcl/pcl_base.h>
45 #include <pcl/point_representation.h>
67 template <
typename Po
intFeature>
73 typedef boost::shared_ptr<PyramidFeatureHistogram<PointFeature> >
Ptr;
86 { dimension_range_input_ = dimension_range_input; }
89 inline std::vector<std::pair<float, float> >
97 { dimension_range_target_ = dimension_range_target; }
100 inline std::vector<std::pair<float, float> >
107 setPointRepresentation (
const FeatureRepresentationConstPtr& feature_representation) { feature_representation_ = feature_representation; }
110 inline FeatureRepresentationConstPtr
const
128 const PyramidFeatureHistogramPtr &pyramid_b);
132 size_t nr_dimensions, nr_levels, nr_features;
133 std::vector<std::pair<float, float> > dimension_range_input_, dimension_range_target_;
134 FeatureRepresentationConstPtr feature_representation_;
139 initializeHistogram ();
145 convertFeatureToVector (
const PointFeature &feature,
146 std::vector<float> &feature_vector);
150 addFeature (std::vector<float> &feature);
158 at (std::vector<size_t> &access,
166 at (std::vector<float> &feature,
170 struct PyramidFeatureHistogramLevel
172 PyramidFeatureHistogramLevel () :
174 bins_per_dimension (),
179 PyramidFeatureHistogramLevel (std::vector<size_t> &a_bins_per_dimension, std::vector<float> &a_bin_step) :
181 bins_per_dimension (a_bins_per_dimension),
182 bin_step (a_bin_step)
184 initializeHistogramLevel ();
188 initializeHistogramLevel ();
190 std::vector<unsigned int> hist;
191 std::vector<size_t> bins_per_dimension;
192 std::vector<float> bin_step;
194 std::vector<PyramidFeatureHistogramLevel> hist_levels;
198 #ifdef PCL_NO_PRECOMPILE
199 #include <pcl/registration/impl/pyramid_feature_matching.hpp>
202 #endif // PCL_PYRAMID_FEATURE_MATCHING_H_
Class that compares two sets of features by using a multiscale representation of the features inside ...
void compute()
The central method for inserting the feature set inside the pyramid and obtaining the complete pyrami...
boost::shared_ptr< PyramidFeatureHistogram< PointFeature > > Ptr
void setTargetDimensionRange(std::vector< std::pair< float, float > > &dimension_range_target)
Method to set the target dimension range parameter.
std::vector< std::pair< float, float > > getTargetDimensionRange()
Method for retrieving the target dimension range vector.
PyramidFeatureHistogram()
Empty constructor that instantiates the feature representation variable.
bool isComputed()
Checks whether the pyramid histogram has been computed.
boost::shared_ptr< const pcl::PointRepresentation< PointFeature > > FeatureRepresentationConstPtr
void setInputDimensionRange(std::vector< std::pair< float, float > > &dimension_range_input)
Method for setting the input dimension range parameter.
FeatureRepresentationConstPtr const getPointRepresentation()
Get a pointer to the feature representation used when converting features into k-D vectors...
Ptr PyramidFeatureHistogramPtr
static float comparePyramidFeatureHistograms(const PyramidFeatureHistogramPtr &pyramid_a, const PyramidFeatureHistogramPtr &pyramid_b)
Static method for comparing two pyramid histograms that returns a floating point value between 0 and ...
std::vector< std::pair< float, float > > getInputDimensionRange()
Method for retrieving the input dimension range vector.
void setPointRepresentation(const FeatureRepresentationConstPtr &feature_representation)
Provide a pointer to the feature representation to use to convert features to k-D vectors...