SIFTKeypoint detects the Scale Invariant Feature Transform keypoints for a given point cloud dataset containing points and intensity. This implementation adapts the original algorithm from images to point clouds. More...
#include <sift_keypoint.h>
Public Types | |
typedef boost::shared_ptr < const SIFTKeypoint< PointInT, PointOutT > > | ConstPtr |
typedef Keypoint< PointInT, PointOutT >::KdTree | KdTree |
typedef Keypoint< PointInT, PointOutT >::PointCloudIn | PointCloudIn |
typedef Keypoint< PointInT, PointOutT >::PointCloudOut | PointCloudOut |
typedef boost::shared_ptr < SIFTKeypoint< PointInT, PointOutT > > | Ptr |
Public Member Functions | |
void | setMinimumContrast (float min_contrast) |
Provide a threshold to limit detection of keypoints without sufficient contrast. | |
void | setScales (float min_scale, int nr_octaves, int nr_scales_per_octave) |
Specify the range of scales over which to search for keypoints. | |
SIFTKeypoint () | |
Empty constructor. | |
Protected Member Functions | |
void | detectKeypoints (PointCloudOut &output) |
Detect the SIFT keypoints for a set of points given in setInputCloud () using the spatial locator in setSearchMethod (). | |
bool | initCompute () |
This method should get called before starting the actual computation. | |
Private Member Functions | |
void | computeScaleSpace (const PointCloudIn &input, KdTree &tree, const std::vector< float > &scales, Eigen::MatrixXf &diff_of_gauss) |
Compute the difference-of-Gaussian (DoG) scale space for the given input and scales. | |
void | detectKeypointsForOctave (const PointCloudIn &input, KdTree &tree, float base_scale, int nr_scales_per_octave, PointCloudOut &output) |
Detect the SIFT keypoints for a given point cloud for a single octave. | |
void | findScaleSpaceExtrema (const PointCloudIn &input, KdTree &tree, const Eigen::MatrixXf &diff_of_gauss, std::vector< int > &extrema_indices, std::vector< int > &extrema_scales) |
Find the local minima and maxima in the provided difference-of-Gaussian (DoG) scale space. | |
Private Attributes | |
SIFTKeypointFieldSelector < PointInT > | getFieldValue_ |
float | min_contrast_ |
The minimum contrast required for detection. | |
float | min_scale_ |
The standard deviation of the smallest scale in the scale space. | |
int | nr_octaves_ |
The number of octaves (i.e. doublings of scale) over which to search for keypoints. | |
int | nr_scales_per_octave_ |
The number of scales to be computed for each octave. | |
std::vector< pcl::PCLPointField > | out_fields_ |
The list of fields present in the output point cloud data. | |
int | scale_idx_ |
Set to a value different than -1 if the output cloud has a "scale" field and we have to save the keypoints scales. |
SIFTKeypoint detects the Scale Invariant Feature Transform keypoints for a given point cloud dataset containing points and intensity. This implementation adapts the original algorithm from images to point clouds.
For more information about the image-based SIFT interest operator, see:
David G. Lowe, "Distinctive image features from scale-invariant keypoints," International Journal of Computer Vision, 60, 2 (2004), pp. 91-110.
Definition at line 94 of file sift_keypoint.h.
typedef boost::shared_ptr<const SIFTKeypoint<PointInT, PointOutT> > pcl::SIFTKeypoint< PointInT, PointOutT >::ConstPtr |
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 98 of file sift_keypoint.h.
typedef Keypoint<PointInT, PointOutT>::KdTree pcl::SIFTKeypoint< PointInT, PointOutT >::KdTree |
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 102 of file sift_keypoint.h.
typedef Keypoint<PointInT, PointOutT>::PointCloudIn pcl::SIFTKeypoint< PointInT, PointOutT >::PointCloudIn |
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 100 of file sift_keypoint.h.
typedef Keypoint<PointInT, PointOutT>::PointCloudOut pcl::SIFTKeypoint< PointInT, PointOutT >::PointCloudOut |
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 101 of file sift_keypoint.h.
typedef boost::shared_ptr<SIFTKeypoint<PointInT, PointOutT> > pcl::SIFTKeypoint< PointInT, PointOutT >::Ptr |
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 97 of file sift_keypoint.h.
pcl::SIFTKeypoint< PointInT, PointOutT >::SIFTKeypoint | ( | ) | [inline] |
Empty constructor.
Definition at line 112 of file sift_keypoint.h.
void pcl::SIFTKeypoint< PointInT, PointOutT >::computeScaleSpace | ( | const PointCloudIn & | input, |
KdTree & | tree, | ||
const std::vector< float > & | scales, | ||
Eigen::MatrixXf & | diff_of_gauss | ||
) | [private] |
Compute the difference-of-Gaussian (DoG) scale space for the given input and scales.
input | the point cloud for which the DoG scale space will be computed |
tree | a k-D tree of the points in input |
scales | a vector containing the scales over which to compute the DoG scale space |
diff_of_gauss | the resultant DoG scale space (in a number-of-points by number-of-scales matrix) |
Definition at line 207 of file sift_keypoint.hpp.
void pcl::SIFTKeypoint< PointInT, PointOutT >::detectKeypoints | ( | PointCloudOut & | output | ) | [protected, virtual] |
Detect the SIFT keypoints for a set of points given in setInputCloud () using the spatial locator in setSearchMethod ().
output | the resultant cloud of keypoints |
Implements pcl::Keypoint< PointInT, PointOutT >.
Definition at line 98 of file sift_keypoint.hpp.
void pcl::SIFTKeypoint< PointInT, PointOutT >::detectKeypointsForOctave | ( | const PointCloudIn & | input, |
KdTree & | tree, | ||
float | base_scale, | ||
int | nr_scales_per_octave, | ||
PointCloudOut & | output | ||
) | [private] |
Detect the SIFT keypoints for a given point cloud for a single octave.
input | the point cloud to detect keypoints in |
tree | a k-D tree of the points in input |
base_scale | the first (smallest) scale in the octave |
nr_scales_per_octave | the number of scales to to compute |
output | the resultant point cloud containing the SIFT keypoints |
Definition at line 152 of file sift_keypoint.hpp.
void pcl::SIFTKeypoint< PointInT, PointOutT >::findScaleSpaceExtrema | ( | const PointCloudIn & | input, |
KdTree & | tree, | ||
const Eigen::MatrixXf & | diff_of_gauss, | ||
std::vector< int > & | extrema_indices, | ||
std::vector< int > & | extrema_scales | ||
) | [private] |
Find the local minima and maxima in the provided difference-of-Gaussian (DoG) scale space.
input | the input point cloud |
tree | a k-D tree of the points in input |
diff_of_gauss | the DoG scale space (in a number-of-points by number-of-scales matrix) |
extrema_indices | the resultant vector containing the point indices of each keypoint |
extrema_scales | the resultant vector containing the scale indices of each keypoint |
Definition at line 258 of file sift_keypoint.hpp.
bool pcl::SIFTKeypoint< PointInT, PointOutT >::initCompute | ( | ) | [protected, virtual] |
This method should get called before starting the actual computation.
Internally, initCompute() does the following:
Reimplemented from pcl::Keypoint< PointInT, PointOutT >.
Definition at line 64 of file sift_keypoint.hpp.
void pcl::SIFTKeypoint< PointInT, PointOutT >::setMinimumContrast | ( | float | min_contrast | ) |
Provide a threshold to limit detection of keypoints without sufficient contrast.
min_contrast | the minimum contrast required for detection |
Definition at line 57 of file sift_keypoint.hpp.
void pcl::SIFTKeypoint< PointInT, PointOutT >::setScales | ( | float | min_scale, |
int | nr_octaves, | ||
int | nr_scales_per_octave | ||
) |
Specify the range of scales over which to search for keypoints.
min_scale | the standard deviation of the smallest scale in the scale space |
nr_octaves | the number of octaves (i.e. doublings of scale) to compute |
nr_scales_per_octave | the number of scales to compute within each octave |
Definition at line 47 of file sift_keypoint.hpp.
SIFTKeypointFieldSelector<PointInT> pcl::SIFTKeypoint< PointInT, PointOutT >::getFieldValue_ [private] |
Definition at line 200 of file sift_keypoint.h.
float pcl::SIFTKeypoint< PointInT, PointOutT >::min_contrast_ [private] |
The minimum contrast required for detection.
Definition at line 191 of file sift_keypoint.h.
float pcl::SIFTKeypoint< PointInT, PointOutT >::min_scale_ [private] |
The standard deviation of the smallest scale in the scale space.
Definition at line 182 of file sift_keypoint.h.
int pcl::SIFTKeypoint< PointInT, PointOutT >::nr_octaves_ [private] |
The number of octaves (i.e. doublings of scale) over which to search for keypoints.
Definition at line 185 of file sift_keypoint.h.
int pcl::SIFTKeypoint< PointInT, PointOutT >::nr_scales_per_octave_ [private] |
The number of scales to be computed for each octave.
Definition at line 188 of file sift_keypoint.h.
std::vector<pcl::PCLPointField> pcl::SIFTKeypoint< PointInT, PointOutT >::out_fields_ [private] |
The list of fields present in the output point cloud data.
Definition at line 198 of file sift_keypoint.h.
int pcl::SIFTKeypoint< PointInT, PointOutT >::scale_idx_ [private] |
Set to a value different than -1 if the output cloud has a "scale" field and we have to save the keypoints scales.
Definition at line 195 of file sift_keypoint.h.