Class that compares two sets of features by using a multiscale representation of the features inside a pyramid. Each level of the pyramid offers information about the similarity of the two feature sets. More...
#include <pyramid_feature_matching.h>
Classes | |
struct | PyramidFeatureHistogramLevel |
Structure for representing a single pyramid histogram level. More... | |
Public Types | |
typedef boost::shared_ptr < const pcl::PointRepresentation < PointFeature > > | FeatureRepresentationConstPtr |
typedef boost::shared_ptr < PyramidFeatureHistogram < PointFeature > > | Ptr |
typedef Ptr | PyramidFeatureHistogramPtr |
Public Member Functions | |
void | compute () |
The central method for inserting the feature set inside the pyramid and obtaining the complete pyramid. | |
std::vector< std::pair< float, float > > | getInputDimensionRange () |
Method for retrieving the input dimension range vector. | |
FeatureRepresentationConstPtr const | getPointRepresentation () |
Get a pointer to the feature representation used when converting features into k-D vectors. | |
std::vector< std::pair< float, float > > | getTargetDimensionRange () |
Method for retrieving the target dimension range vector. | |
bool | isComputed () |
Checks whether the pyramid histogram has been computed. | |
PyramidFeatureHistogram () | |
Empty constructor that instantiates the feature representation variable. | |
void | setInputDimensionRange (std::vector< std::pair< float, float > > &dimension_range_input) |
Method for setting the input dimension range parameter. | |
void | setPointRepresentation (const FeatureRepresentationConstPtr &feature_representation) |
Provide a pointer to the feature representation to use to convert features to k-D vectors. | |
void | setTargetDimensionRange (std::vector< std::pair< float, float > > &dimension_range_target) |
Method to set the target dimension range parameter. | |
Static Public Member Functions | |
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 1, representing the similiarity between the feature sets on which the two pyramid histograms are based. | |
Private Member Functions | |
void | addFeature (std::vector< float > &feature) |
Adds a feature vector to its corresponding bin at each level in the pyramid. | |
unsigned int & | at (std::vector< size_t > &access, size_t &level) |
Access the pyramid bin given the position of the bin at the given pyramid level and the pyramid level. | |
unsigned int & | at (std::vector< float > &feature, size_t &level) |
Access the pyramid bin given a feature vector and the pyramid level. | |
void | convertFeatureToVector (const PointFeature &feature, std::vector< float > &feature_vector) |
Converts a feature in templated form to an STL vector. This is the point where the conversion from the input dimension range to the target dimension range is done. | |
bool | initializeHistogram () |
Checks for input inconsistencies and initializes the underlying data structures. | |
Private Attributes | |
std::vector< std::pair< float, float > > | dimension_range_input_ |
std::vector< std::pair< float, float > > | dimension_range_target_ |
FeatureRepresentationConstPtr | feature_representation_ |
std::vector < PyramidFeatureHistogramLevel > | hist_levels |
bool | is_computed_ |
size_t | nr_dimensions |
size_t | nr_features |
size_t | nr_levels |
Class that compares two sets of features by using a multiscale representation of the features inside a pyramid. Each level of the pyramid offers information about the similarity of the two feature sets.
Follows the algorithm presented in the publication: Grauman, K. & Darrell, T. The Pyramid Match Kernel: Discriminative Classification with Sets of Image Features Tenth IEEE International Conference on Computer Vision ICCV05 Volume 1 October 2005
Definition at line 65 of file pyramid_feature_matching.h.
typedef boost::shared_ptr<const pcl::PointRepresentation<PointFeature> > pcl::PyramidFeatureHistogram< PointFeature >::FeatureRepresentationConstPtr |
Definition at line 72 of file pyramid_feature_matching.h.
typedef boost::shared_ptr<PyramidFeatureHistogram<PointFeature> > pcl::PyramidFeatureHistogram< PointFeature >::Ptr |
Definition at line 70 of file pyramid_feature_matching.h.
typedef Ptr pcl::PyramidFeatureHistogram< PointFeature >::PyramidFeatureHistogramPtr |
Definition at line 71 of file pyramid_feature_matching.h.
pcl::PyramidFeatureHistogram< PointFeature >::PyramidFeatureHistogram | ( | ) |
Empty constructor that instantiates the feature representation variable.
Definition at line 126 of file pyramid_feature_matching.hpp.
void pcl::PyramidFeatureHistogram< PointFeature >::addFeature | ( | std::vector< float > & | feature | ) | [private] |
Adds a feature vector to its corresponding bin at each level in the pyramid.
Definition at line 303 of file pyramid_feature_matching.hpp.
unsigned int & pcl::PyramidFeatureHistogram< PointFeature >::at | ( | std::vector< size_t > & | access, |
size_t & | level | ||
) | [inline, private] |
Access the pyramid bin given the position of the bin at the given pyramid level and the pyramid level.
access | index of the bin at the respective level |
level | the level in the pyramid |
Definition at line 216 of file pyramid_feature_matching.hpp.
unsigned int & pcl::PyramidFeatureHistogram< PointFeature >::at | ( | std::vector< float > & | feature, |
size_t & | level | ||
) | [inline, private] |
Access the pyramid bin given a feature vector and the pyramid level.
feature | the feature in vectorized form |
level | the level in the pyramid |
Definition at line 245 of file pyramid_feature_matching.hpp.
float pcl::PyramidFeatureHistogram< PointFeature >::comparePyramidFeatureHistograms | ( | const PyramidFeatureHistogramPtr & | pyramid_a, |
const PyramidFeatureHistogramPtr & | pyramid_b | ||
) | [static] |
Static method for comparing two pyramid histograms that returns a floating point value between 0 and 1, representing the similiarity between the feature sets on which the two pyramid histograms are based.
pyramid_a | Pointer to the first pyramid to be compared (needs to be computed already). |
pyramid_b | Pointer to the second pyramid to be compared (needs to be computed already). |
Definition at line 58 of file pyramid_feature_matching.hpp.
void pcl::PyramidFeatureHistogram< PointFeature >::compute | ( | ) |
The central method for inserting the feature set inside the pyramid and obtaining the complete pyramid.
Definition at line 285 of file pyramid_feature_matching.hpp.
void pcl::PyramidFeatureHistogram< PointFeature >::convertFeatureToVector | ( | const PointFeature & | feature, |
std::vector< float > & | feature_vector | ||
) | [private] |
Converts a feature in templated form to an STL vector. This is the point where the conversion from the input dimension range to the target dimension range is done.
Definition at line 269 of file pyramid_feature_matching.hpp.
std::vector<std::pair<float, float> > pcl::PyramidFeatureHistogram< PointFeature >::getInputDimensionRange | ( | ) | [inline] |
Method for retrieving the input dimension range vector.
Definition at line 87 of file pyramid_feature_matching.h.
FeatureRepresentationConstPtr const pcl::PyramidFeatureHistogram< PointFeature >::getPointRepresentation | ( | ) | [inline] |
Get a pointer to the feature representation used when converting features into k-D vectors.
Definition at line 108 of file pyramid_feature_matching.h.
std::vector<std::pair<float, float> > pcl::PyramidFeatureHistogram< PointFeature >::getTargetDimensionRange | ( | ) | [inline] |
Method for retrieving the target dimension range vector.
Definition at line 98 of file pyramid_feature_matching.h.
bool pcl::PyramidFeatureHistogram< PointFeature >::initializeHistogram | ( | ) | [private] |
Checks for input inconsistencies and initializes the underlying data structures.
Definition at line 149 of file pyramid_feature_matching.hpp.
bool pcl::PyramidFeatureHistogram< PointFeature >::isComputed | ( | ) | [inline] |
Checks whether the pyramid histogram has been computed.
Definition at line 116 of file pyramid_feature_matching.h.
void pcl::PyramidFeatureHistogram< PointFeature >::setInputDimensionRange | ( | std::vector< std::pair< float, float > > & | dimension_range_input | ) | [inline] |
Method for setting the input dimension range parameter.
Definition at line 82 of file pyramid_feature_matching.h.
void pcl::PyramidFeatureHistogram< PointFeature >::setPointRepresentation | ( | const FeatureRepresentationConstPtr & | feature_representation | ) | [inline] |
Provide a pointer to the feature representation to use to convert features to k-D vectors.
feature_representation | the const boost shared pointer to a PointRepresentation |
Definition at line 104 of file pyramid_feature_matching.h.
void pcl::PyramidFeatureHistogram< PointFeature >::setTargetDimensionRange | ( | std::vector< std::pair< float, float > > & | dimension_range_target | ) | [inline] |
Method to set the target dimension range parameter.
Definition at line 93 of file pyramid_feature_matching.h.
std::vector<std::pair<float, float> > pcl::PyramidFeatureHistogram< PointFeature >::dimension_range_input_ [private] |
Definition at line 130 of file pyramid_feature_matching.h.
std::vector<std::pair<float, float> > pcl::PyramidFeatureHistogram< PointFeature >::dimension_range_target_ [private] |
Definition at line 130 of file pyramid_feature_matching.h.
FeatureRepresentationConstPtr pcl::PyramidFeatureHistogram< PointFeature >::feature_representation_ [private] |
Definition at line 131 of file pyramid_feature_matching.h.
std::vector<PyramidFeatureHistogramLevel> pcl::PyramidFeatureHistogram< PointFeature >::hist_levels [private] |
Definition at line 191 of file pyramid_feature_matching.h.
bool pcl::PyramidFeatureHistogram< PointFeature >::is_computed_ [private] |
Definition at line 132 of file pyramid_feature_matching.h.
size_t pcl::PyramidFeatureHistogram< PointFeature >::nr_dimensions [private] |
Definition at line 129 of file pyramid_feature_matching.h.
size_t pcl::PyramidFeatureHistogram< PointFeature >::nr_features [private] |
Definition at line 129 of file pyramid_feature_matching.h.
size_t pcl::PyramidFeatureHistogram< PointFeature >::nr_levels [private] |
Definition at line 129 of file pyramid_feature_matching.h.