Features: Michael Dixon and Radu B. Rusu
Features: Michael Dixon and Radu B. Rusu
Feature Estimation
Keypoint Detection
PCL :: Features
Michael Dixon and Radu B. Rusu
July 1, 2011
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Outline
1. Introduction
2. Feature Estimation
3. Keypoint Detection
4. Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Outline
1. Introduction
2. Feature Estimation
3. Keypoint Detection
4. Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Local Features
What is a feature?
What is a feature?
In vision/perception, the word feature can mean many
different things. In PCL, feature estimation means:
I
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Local Features
What is a feature?
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Cj =
i =
Pk
i=1 i
di2
2
(pi pj )T (pi pj ), p =
, pi outlier
1
k
p =
Pk
i=1 pi
0
0 +1 +2
1, pi inlier
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
NormalEstimation example
Estimating surface normals
void compute_surface_normals
(pcl::PointCloud<pcl::PointXYZRGB>::Ptr &points, float normal_radius
pcl::PointCloud<pcl::Normal>::Ptr &normals_out)
{
pcl::NormalEstimation<pcl::PointXYZRGB, pcl::Normal> norm_est;
// Use a FLANN-based KdTree to perform neighborhood searches
norm_est.setSearchMethod
(pcl::KdTreeFLANN<pcl::PointXYZRGB>::Ptr
(new pcl::KdTreeFLANN<pcl::PointXYZRGB>));
// Specify the size of the local neighborhood to use when
// computing the surface normals
norm_est.setRadiusSearch (normal_radius);
// Set the input points
norm_est.setInputCloud (points);
// Set the search surface (i.e., the points that will be used
// when search for the input points neighbors)
norm_est.setSearchSurface (points);
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
NormalEstimation results
$ ./features_demo ../data/robot1.pcd normals
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
j
k
f1 = hu, pj pi i/||pj pi ||
P
fx d
x
ihist = x3
x=0 fxmax fxmin d
f2 = ||pj pi ||
f3 = atan(hw, nj i, hu, nj i)
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
f0 = hv , nj i
j
k
f1 = hu, pj pi i/||pj pi ||
P
fx d
x
ihist = x3
x=0 fxmax fxmin d
f2 = ||pj pi ||
f3 = atan(hw, nj i, hu, nj i)
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
PFHEstimation example
PFH is a more complex feature descriptor, but the code is very similar
using namespace pcl; // Lets save ourselves some typing
void compute_PFH_features
(PointCloud<PointXYZRGB>::Ptr &points, PointCloud<Normal>::Ptr &norm
float feature_radius, PointCloud<PFHSignature125>::Ptr &descriptors
{
// Create a PFHEstimation object
PFHEstimation<PointXYZRGB, Normal, PFHSignature125> pfh_est;
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
PHFEstimation example
...actually, well get back to this one later. For now, lets move
on to keypoints.
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Outline
1. Introduction
2. Feature Estimation
3. Keypoint Detection
4. Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Keypoints
What is a keypoint?
What is a keypoint?
I
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Keypoints
What is a keypoint?
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Keypoints
Why find keypoints?
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Keypoints
Keypoint detection in PCL
SIFTKeypoint
I
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
SIFTKeypoints example
Computing keypoints on a cloud of PointXYZRGB points
using namespace pcl;
void detect_keypoints
(PointCloud<PointXYZRGB>::Ptr &points, float min_scale,
int nr_octaves, int nr_scales_per_octave, float min_contrast,
PointCloud<PointWithScale>::Ptr &keypoints_out)
{
SIFTKeypoint<PointXYZRGB, PointWithScale> sift_detect;
// Use a FLANN-based KdTree to perform neighborhood searches
sift_detect.setSearchMethod
(KdTreeFLANN<PointXYZRGB>::Ptr
(new KdTreeFLANN<PointXYZRGB>));
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
SIFTKeypoint results
$ ./features_demo ../data/robot1.pcd keypoints
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Outline
1. Introduction
2. Feature Estimation
3. Keypoint Detection
4. Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Keypoints + features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
// Use all of the points for analyzing the local structure of the cl
pfh_est.setSearchSurface (points);
pfh_est.setInputNormals (normals);
// But only compute features at the keypoints
pfh_est.setInputCloud (keypoints_xyzrgb);
// Compute the features
pfh_est.compute (*descriptors_out);
}
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Introduction
Feature Estimation
Keypoint Detection
Keypoints + Features
Correspondence results
$ ./features_demo ../data/robot
correspondences