Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
features
normal_based_signature.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2011, Alexandru-Eugen Ichim
6
* Copyright (c) 2012-, Open Perception, Inc.
7
*
8
* All rights reserved.
9
*
10
* Redistribution and use in source and binary forms, with or without
11
* modification, are permitted provided that the following conditions
12
* are met:
13
*
14
* * Redistributions of source code must retain the above copyright
15
* notice, this list of conditions and the following disclaimer.
16
* * Redistributions in binary form must reproduce the above
17
* copyright notice, this list of conditions and the following
18
* disclaimer in the documentation and/or other materials provided
19
* with the distribution.
20
* * Neither the name of the copyright holder(s) nor the names of its
21
* contributors may be used to endorse or promote products derived
22
* from this software without specific prior written permission.
23
*
24
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
* POSSIBILITY OF SUCH DAMAGE.
36
*
37
* $Id$
38
*/
39
40
#pragma once
41
42
#include <pcl/features/feature.h>
43
44
namespace
pcl
45
{
46
/** \brief Normal-based feature signature estimation class. Obtains the feature vector by applying Discrete Cosine and
47
* Fourier Transforms on an NxM array of real numbers representing the projection distances of the points in the input
48
* cloud to a disc around the point of interest.
49
* Please consult the following publication for more details:
50
* Xinju Li and Igor Guskov
51
* Multi-scale features for approximate alignment of point-based surfaces
52
* Proceedings of the third Eurographics symposium on Geometry processing
53
* July 2005, Vienna, Austria
54
*
55
* \note These features were meant to be used at keypoints detected by a detector using different smoothing radii
56
* (e.g., SmoothedSurfacesKeypoint)
57
* \author Alexandru-Eugen Ichim
58
*/
59
template
<
typename
Po
int
T,
typename
Po
int
NT,
typename
Po
int
Feature>
60
class
NormalBasedSignatureEstimation
:
public
FeatureFromNormals
<PointT, PointNT, PointFeature>
61
{
62
public
:
63
using
Feature
<PointT, PointFeature>
::input_
;
64
using
Feature
<PointT, PointFeature>
::tree_
;
65
using
Feature
<PointT, PointFeature>
::search_radius_
;
66
using
PCLBase
<PointT>
::indices_
;
67
using
FeatureFromNormals
<PointT, PointNT, PointFeature>
::normals_
;
68
69
using
FeatureCloud
=
pcl::PointCloud<PointFeature>
;
70
using
Ptr
= shared_ptr<NormalBasedSignatureEstimation<PointT, PointNT, PointFeature> >;
71
using
ConstPtr
= shared_ptr<const NormalBasedSignatureEstimation<PointT, PointNT, PointFeature> >;
72
73
74
75
/** \brief Empty constructor, initializes the internal parameters to the default values
76
*/
77
NormalBasedSignatureEstimation
()
78
:
FeatureFromNormals
<PointT, PointNT, PointFeature> ()
79
{
80
}
81
82
/** \brief Setter method for the N parameter - the length of the columns used for the Discrete Fourier Transform.
83
* \param[in] n the length of the columns used for the Discrete Fourier Transform.
84
*/
85
inline
void
86
setN
(std::size_t n) { N_ = n; }
87
88
/** \brief Returns the N parameter - the length of the columns used for the Discrete Fourier Transform. */
89
inline
std::size_t
90
getN
() {
return
N_; }
91
92
/** \brief Setter method for the M parameter - the length of the rows used for the Discrete Cosine Transform.
93
* \param[in] m the length of the rows used for the Discrete Cosine Transform.
94
*/
95
inline
void
96
setM
(std::size_t m) { M_ = m; }
97
98
/** \brief Returns the M parameter - the length of the rows used for the Discrete Cosine Transform */
99
inline
std::size_t
100
getM
() {
return
M_; }
101
102
/** \brief Setter method for the N' parameter - the number of columns to be taken from the matrix of DFT and DCT
103
* values that will be contained in the output feature vector
104
* \note This value directly influences the dimensions of the type of output points (PointFeature)
105
* \param[in] n_prime the number of columns from the matrix of DFT and DCT that will be contained in the output
106
*/
107
inline
void
108
setNPrime
(std::size_t n_prime) { N_prime_ = n_prime; }
109
110
/** \brief Returns the N' parameter - the number of rows to be taken from the matrix of DFT and DCT
111
* values that will be contained in the output feature vector
112
* \note This value directly influences the dimensions of the type of output points (PointFeature)
113
*/
114
inline
std::size_t
115
getNPrime
() {
return
N_prime_; }
116
117
/** \brief Setter method for the M' parameter - the number of rows to be taken from the matrix of DFT and DCT
118
* values that will be contained in the output feature vector
119
* \note This value directly influences the dimensions of the type of output points (PointFeature)
120
* \param[in] m_prime the number of rows from the matrix of DFT and DCT that will be contained in the output
121
*/
122
inline
void
123
setMPrime
(std::size_t m_prime) { M_prime_ = m_prime; }
124
125
/** \brief Returns the M' parameter - the number of rows to be taken from the matrix of DFT and DCT
126
* values that will be contained in the output feature vector
127
* \note This value directly influences the dimensions of the type of output points (PointFeature)
128
*/
129
inline
std::size_t
130
getMPrime
() {
return
M_prime_; }
131
132
/** \brief Setter method for the scale parameter - used to determine the radius of the sampling disc around the
133
* point of interest - linked to the smoothing scale of the input cloud
134
*/
135
inline
void
136
setScale
(
float
scale) { scale_h_ = scale; }
137
138
/** \brief Returns the scale parameter - used to determine the radius of the sampling disc around the
139
* point of interest - linked to the smoothing scale of the input cloud
140
*/
141
inline
float
142
getScale
() {
return
scale_h_; }
143
144
145
protected
:
146
void
147
computeFeature
(
FeatureCloud
&output)
override
;
148
149
private
:
150
float
scale_h_{};
151
std::size_t N_{36}, M_{8}, N_prime_{4}, M_prime_{3};
152
};
153
}
154
155
#ifdef PCL_NO_PRECOMPILE
156
#include <pcl/features/impl/normal_based_signature.hpp>
157
#endif
pcl::FeatureFromNormals< PointT, PointNT, PointFeature >::FeatureFromNormals
FeatureFromNormals()
Definition
feature.h:329
pcl::FeatureFromNormals< PointT, PointNT, PointFeature >::normals_
PointCloudNConstPtr normals_
Definition
feature.h:349
pcl::Feature
Feature represents the base feature class.
Definition
feature.h:107
pcl::Feature< PointT, PointFeature >::search_radius_
double search_radius_
Definition
feature.h:237
pcl::Feature< PointT, PointFeature >::tree_
KdTreePtr tree_
Definition
feature.h:231
pcl::NormalBasedSignatureEstimation::setNPrime
void setNPrime(std::size_t n_prime)
Setter method for the N' parameter - the number of columns to be taken from the matrix of DFT and DCT...
Definition
normal_based_signature.h:108
pcl::NormalBasedSignatureEstimation::FeatureCloud
pcl::PointCloud< PointFeature > FeatureCloud
Definition
normal_based_signature.h:69
pcl::NormalBasedSignatureEstimation::setM
void setM(std::size_t m)
Setter method for the M parameter - the length of the rows used for the Discrete Cosine Transform.
Definition
normal_based_signature.h:96
pcl::NormalBasedSignatureEstimation::setScale
void setScale(float scale)
Setter method for the scale parameter - used to determine the radius of the sampling disc around the ...
Definition
normal_based_signature.h:136
pcl::NormalBasedSignatureEstimation::computeFeature
void computeFeature(FeatureCloud &output) override
Abstract feature estimation method.
Definition
normal_based_signature.hpp:46
pcl::NormalBasedSignatureEstimation::getN
std::size_t getN()
Returns the N parameter - the length of the columns used for the Discrete Fourier Transform.
Definition
normal_based_signature.h:90
pcl::NormalBasedSignatureEstimation::setMPrime
void setMPrime(std::size_t m_prime)
Setter method for the M' parameter - the number of rows to be taken from the matrix of DFT and DCT va...
Definition
normal_based_signature.h:123
pcl::NormalBasedSignatureEstimation::getScale
float getScale()
Returns the scale parameter - used to determine the radius of the sampling disc around the point of i...
Definition
normal_based_signature.h:142
pcl::NormalBasedSignatureEstimation::getM
std::size_t getM()
Returns the M parameter - the length of the rows used for the Discrete Cosine Transform.
Definition
normal_based_signature.h:100
pcl::NormalBasedSignatureEstimation::getMPrime
std::size_t getMPrime()
Returns the M' parameter - the number of rows to be taken from the matrix of DFT and DCT values that ...
Definition
normal_based_signature.h:130
pcl::NormalBasedSignatureEstimation::ConstPtr
shared_ptr< const NormalBasedSignatureEstimation< PointT, PointNT, PointFeature > > ConstPtr
Definition
normal_based_signature.h:71
pcl::NormalBasedSignatureEstimation::setN
void setN(std::size_t n)
Setter method for the N parameter - the length of the columns used for the Discrete Fourier Transform...
Definition
normal_based_signature.h:86
pcl::NormalBasedSignatureEstimation::NormalBasedSignatureEstimation
NormalBasedSignatureEstimation()
Empty constructor, initializes the internal parameters to the default values.
Definition
normal_based_signature.h:77
pcl::NormalBasedSignatureEstimation::Ptr
shared_ptr< NormalBasedSignatureEstimation< PointT, PointNT, PointFeature > > Ptr
Definition
normal_based_signature.h:70
pcl::NormalBasedSignatureEstimation::getNPrime
std::size_t getNPrime()
Returns the N' parameter - the number of rows to be taken from the matrix of DFT and DCT values that ...
Definition
normal_based_signature.h:115
pcl::PCLBase
PCL base class.
Definition
pcl_base.h:70
pcl::PCLBase::input_
PointCloudConstPtr input_
The input point cloud dataset.
Definition
pcl_base.h:147
pcl::PCLBase::indices_
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition
pcl_base.h:150
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition
point_cloud.h:174
pcl
Definition
convolution.h:46