Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT > Class Template Reference

HarrisKeypoint3D uses the idea of 2D Harris keypoints, but instead of using image gradients, it uses surface normals. More...

#include <pcl/keypoints/harris_keypoint3D.h>

Inheritance diagram for pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ResponseMethod {
  HARRIS = 1, NOBLE, LOWE, TOMASI,
  CURVATURE
}
typedef Keypoint< PointInT,
PointOutT >::PointCloudIn 
PointCloudIn
typedef Keypoint< PointInT,
PointOutT >::PointCloudOut 
PointCloudOut
typedef Keypoint< PointInT,
PointOutT >::KdTree 
KdTree
typedef PointCloudIn::ConstPtr PointCloudInConstPtr
typedef pcl::PointCloud< NormalTPointCloudN
typedef PointCloudN::Ptr PointCloudNPtr
typedef PointCloudN::ConstPtr PointCloudNConstPtr
typedef PCLBase< PointInT > BaseClass
typedef pcl::search::Search
< PointInT >::Ptr 
KdTreePtr
typedef PointCloudIn::Ptr PointCloudInPtr
typedef boost::function< int(int,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethod
typedef boost::function< int(const
PointCloudIn &cloud, int index,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethodSurface
typedef pcl::PointCloud< PointInT > PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 HarrisKeypoint3D (ResponseMethod method=HARRIS, float radius=0.01f, float threshold=0.0f)
 Constructor.
void setMethod (ResponseMethod type)
 Set the method of the response to be calculated.
void setRadius (float radius)
 Set the radius for normal estimation and non maxima supression.
void setThreshold (float threshold)
 Set the threshold value for detecting corners.
void setNonMaxSupression (bool=false)
 Whether non maxima suppression should be applied or the response for each point should be returned.
void setRefine (bool do_refine)
 Whether the detected key points should be refined or not.
void setNormals (const PointCloudNPtr &normals)
 Set normals if precalculated normals are available.
virtual void setSearchSurface (const PointCloudInConstPtr &cloud)
 Provide a pointer to a dataset to add additional information to estimate the features for every point in the input dataset.
void setNumberOfThreads (int nr_threads)
 Initialize the scheduler and set the number of threads to use.
virtual void setSearchSurface (const PointCloudInConstPtr &cloud)
 Provide a pointer to the input dataset that we need to estimate features at every point for.
PointCloudInConstPtr getSearchSurface ()
 Get a pointer to the surface point cloud dataset.
void setSearchMethod (const KdTreePtr &tree)
 Provide a pointer to the search object.
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used.
double getSearchParameter ()
 Get the internal search parameter.
void setKSearch (int k)
 Set the number of k nearest neighbors to use for the feature estimation.
int getKSearch ()
 get the number of k nearest neighbors used for the feature estimation.
void setRadiusSearch (double radius)
 Set the sphere radius that is to be used for determining the nearest neighbors used for the key point detection.
double getRadiusSearch ()
 Get the sphere radius used for determining the neighbors.
void compute (PointCloudOut &output)
 Base method for key point detection for all points given in <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in setSearchMethod ()
int searchForNeighbors (int index, double parameter, std::vector< int > &indices, std::vector< float > &distances) const
 Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface from setSearchSurface.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointInT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

template<typename PointInT, typename PointOutT, typename NormalT = pcl::Normal>
class pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >

HarrisKeypoint3D uses the idea of 2D Harris keypoints, but instead of using image gradients, it uses surface normals.

Author:
Suat Gedikli

Definition at line 52 of file harris_keypoint3D.h.


Member Typedef Documentation

template<typename PointInT, typename PointOutT>
typedef PCLBase<PointInT> pcl::Keypoint< PointInT, PointOutT >::BaseClass [inherited]

Reimplemented in pcl::NarfKeypoint.

Definition at line 61 of file keypoint.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef Keypoint<PointInT, PointOutT>::KdTree pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::KdTree

Reimplemented from pcl::Keypoint< PointInT, PointOutT >.

Definition at line 57 of file harris_keypoint3D.h.

template<typename PointInT, typename PointOutT>
typedef pcl::search::Search<PointInT>::Ptr pcl::Keypoint< PointInT, PointOutT >::KdTreePtr [inherited]

Reimplemented in pcl::SmoothedSurfacesKeypoint< PointT, PointNT >.

Definition at line 63 of file keypoint.h.

typedef pcl::PointCloud<PointInT > pcl::PCLBase< PointInT >::PointCloud [inherited]

Definition at line 74 of file pcl_base.h.

typedef PointCloud::ConstPtr pcl::PCLBase< PointInT >::PointCloudConstPtr [inherited]
template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef Keypoint<PointInT, PointOutT>::PointCloudIn pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudIn

Reimplemented from pcl::Keypoint< PointInT, PointOutT >.

Definition at line 55 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef PointCloudIn::ConstPtr pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudInConstPtr

Reimplemented from pcl::Keypoint< PointInT, PointOutT >.

Definition at line 58 of file harris_keypoint3D.h.

template<typename PointInT, typename PointOutT>
typedef PointCloudIn::Ptr pcl::Keypoint< PointInT, PointOutT >::PointCloudInPtr [inherited]

Definition at line 65 of file keypoint.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef pcl::PointCloud<NormalT> pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudN

Definition at line 60 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef PointCloudN::ConstPtr pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudNConstPtr

Definition at line 62 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef PointCloudN::Ptr pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudNPtr

Definition at line 61 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
typedef Keypoint<PointInT, PointOutT>::PointCloudOut pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::PointCloudOut

Reimplemented from pcl::Keypoint< PointInT, PointOutT >.

Definition at line 56 of file harris_keypoint3D.h.

typedef PointCloud::Ptr pcl::PCLBase< PointInT >::PointCloudPtr [inherited]

Reimplemented in pcl::OrganizedFastMesh< PointInT >.

Definition at line 75 of file pcl_base.h.

typedef PointIndices::ConstPtr pcl::PCLBase< PointInT >::PointIndicesConstPtr [inherited]

Definition at line 79 of file pcl_base.h.

typedef PointIndices::Ptr pcl::PCLBase< PointInT >::PointIndicesPtr [inherited]

Definition at line 78 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
typedef boost::function<int (int, double, std::vector<int> &, std::vector<float> &)> pcl::Keypoint< PointInT, PointOutT >::SearchMethod [inherited]

Definition at line 68 of file keypoint.h.

template<typename PointInT, typename PointOutT>
typedef boost::function<int (const PointCloudIn &cloud, int index, double, std::vector<int> &, std::vector<float> &)> pcl::Keypoint< PointInT, PointOutT >::SearchMethodSurface [inherited]

Definition at line 69 of file keypoint.h.


Member Enumeration Documentation

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
enum pcl::HarrisKeypoint3D::ResponseMethod
Enumerator:
HARRIS 
NOBLE 
LOWE 
TOMASI 
CURVATURE 

Definition at line 74 of file harris_keypoint3D.h.


Constructor & Destructor Documentation

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::HarrisKeypoint3D ( ResponseMethod  method = HARRIS,
float  radius = 0.01f,
float  threshold = 0.0f 
) [inline]

Constructor.

Parameters:
[in]methodthe method to be used to determine the corner responses
[in]radiusthe radius for normal estimation as well as for non maxima suppression
[in]thresholdthe threshold to filter out weak corners

Definition at line 81 of file harris_keypoint3D.h.


Member Function Documentation

template<typename PointInT , typename PointOutT >
void pcl::Keypoint< PointInT, PointOutT >::compute ( PointCloudOut output) [inline, inherited]

Base method for key point detection for all points given in <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in setSearchMethod ()

Parameters:
outputthe resultant point cloud model dataset containing the estimated features

Definition at line 121 of file keypoint.hpp.

IndicesPtr const pcl::PCLBase< PointInT >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase< PointInT >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
int pcl::Keypoint< PointInT, PointOutT >::getKSearch ( ) [inline, inherited]

get the number of k nearest neighbors used for the feature estimation.

Definition at line 117 of file keypoint.h.

template<typename PointInT, typename PointOutT>
double pcl::Keypoint< PointInT, PointOutT >::getRadiusSearch ( ) [inline, inherited]

Get the sphere radius used for determining the neighbors.

Definition at line 128 of file keypoint.h.

template<typename PointInT, typename PointOutT>
KdTreePtr pcl::Keypoint< PointInT, PointOutT >::getSearchMethod ( ) [inline, inherited]

Get a pointer to the search method used.

Definition at line 103 of file keypoint.h.

template<typename PointInT, typename PointOutT>
double pcl::Keypoint< PointInT, PointOutT >::getSearchParameter ( ) [inline, inherited]

Get the internal search parameter.

Definition at line 107 of file keypoint.h.

template<typename PointInT, typename PointOutT>
PointCloudInConstPtr pcl::Keypoint< PointInT, PointOutT >::getSearchSurface ( ) [inline, inherited]

Get a pointer to the surface point cloud dataset.

Definition at line 93 of file keypoint.h.

const PointInT & pcl::PCLBase< PointInT >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
int pcl::Keypoint< PointInT, PointOutT >::searchForNeighbors ( int  index,
double  parameter,
std::vector< int > &  indices,
std::vector< float > &  distances 
) const [inline, inherited]

Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface from setSearchSurface.

Parameters:
indexthe index of the query point
parameterthe search parameter (either k or radius)
indicesthe resultant vector of indices representing the k-nearest neighbors
distancesthe resultant vector of distances representing the distances from the query point to the k-nearest neighbors

Definition at line 146 of file keypoint.h.

void pcl::PCLBase< PointInT >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

void pcl::PCLBase< PointInT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

virtual void pcl::PCLBase< PointInT >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 103 of file pcl_base.h.

template<typename PointInT, typename PointOutT>
void pcl::Keypoint< PointInT, PointOutT >::setKSearch ( int  k) [inline, inherited]

Set the number of k nearest neighbors to use for the feature estimation.

Parameters:
kthe number of k-nearest neighbors

Definition at line 113 of file keypoint.h.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setMethod ( ResponseMethod  type)

Set the method of the response to be calculated.

Parameters:
[in]type

Definition at line 55 of file harris_keypoint3D.hpp.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setNonMaxSupression ( bool  nonmax = false)

Whether non maxima suppression should be applied or the response for each point should be returned.

Note:
this value needs to be turned on in order to apply thresholding and refinement
Parameters:
[in]nonmaxdefault is false

Definition at line 83 of file harris_keypoint3D.hpp.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setNormals ( const PointCloudNPtr normals)

Set normals if precalculated normals are available.

Parameters:
normals

Definition at line 90 of file harris_keypoint3D.hpp.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setNumberOfThreads ( int  nr_threads) [inline]

Initialize the scheduler and set the number of threads to use.

Parameters:
nr_threadsthe number of hardware threads to use (-1 sets the value back to automatic)

Definition at line 146 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setRadius ( float  radius)

Set the radius for normal estimation and non maxima supression.

Parameters:
[in]radius

Definition at line 69 of file harris_keypoint3D.hpp.

template<typename PointInT, typename PointOutT>
void pcl::Keypoint< PointInT, PointOutT >::setRadiusSearch ( double  radius) [inline, inherited]

Set the sphere radius that is to be used for determining the nearest neighbors used for the key point detection.

Parameters:
radiusthe sphere radius used as the maximum distance to consider a point a neighbor

Reimplemented in pcl::UniformSampling< PointInT >.

Definition at line 124 of file keypoint.h.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setRefine ( bool  do_refine)

Whether the detected key points should be refined or not.

If turned of, the key points are a subset of the original point cloud. Otherwise the key points may be arbitrary. note non maxima supression needs to be on in order to use this feature.

Parameters:
[in]do_refine

Definition at line 76 of file harris_keypoint3D.hpp.

template<typename PointInT, typename PointOutT>
void pcl::Keypoint< PointInT, PointOutT >::setSearchMethod ( const KdTreePtr tree) [inline, inherited]

Provide a pointer to the search object.

Parameters:
treea pointer to the spatial search object.

Definition at line 99 of file keypoint.h.

template<typename PointInT, typename PointOutT>
virtual void pcl::Keypoint< PointInT, PointOutT >::setSearchSurface ( const PointCloudInConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset that we need to estimate features at every point for.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 89 of file keypoint.h.

template<typename PointInT , typename PointOutT , typename NormalT = pcl::Normal>
virtual void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setSearchSurface ( const PointCloudInConstPtr cloud) [inline, virtual]

Provide a pointer to a dataset to add additional information to estimate the features for every point in the input dataset.

This is optional, if this is not set, it will only use the data in the input cloud to estimate the features. This is useful when you only need to compute the features for a downsampled cloud.

Parameters:
[in]clouda pointer to a PointCloud message

Definition at line 140 of file harris_keypoint3D.h.

template<typename PointInT , typename PointOutT , typename NormalT >
void pcl::HarrisKeypoint3D< PointInT, PointOutT, NormalT >::setThreshold ( float  threshold)

Set the threshold value for detecting corners.

This is only evaluated if non maxima suppression is turned on. note non maxima suppression needs to be activated in order to use this feature.

Parameters:
[in]threshold

Definition at line 62 of file harris_keypoint3D.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines