Point Cloud Library (PCL)
1.7.1
Main Page
Modules
Namespaces
Classes
features
include
pcl
features
shot_lrf.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2010-2012, Willow Garage, Inc.
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
#ifndef PCL_FEATURES_SHOT_LRF_H_
41
#define PCL_FEATURES_SHOT_LRF_H_
42
43
#include <pcl/point_types.h>
44
#include <pcl/features/feature.h>
45
46
namespace
pcl
47
{
48
/** \brief SHOTLocalReferenceFrameEstimation estimates the Local Reference Frame used in the calculation
49
* of the (SHOT) descriptor.
50
*
51
* \note If you use this code in any academic work, please cite:
52
*
53
* - F. Tombari, S. Salti, L. Di Stefano
54
* Unique Signatures of Histograms for Local Surface Description.
55
* In Proceedings of the 11th European Conference on Computer Vision (ECCV),
56
* Heraklion, Greece, September 5-11 2010.
57
* - F. Tombari, S. Salti, L. Di Stefano
58
* A Combined Texture-Shape Descriptor For Enhanced 3D Feature Matching.
59
* In Proceedings of the 18th International Conference on Image Processing (ICIP),
60
* Brussels, Belgium, September 11-14 2011.
61
*
62
* \author Samuele Salti, Federico Tombari
63
* \ingroup features
64
*/
65
template
<
typename
Po
int
InT,
typename
Po
int
OutT = ReferenceFrame>
66
class
SHOTLocalReferenceFrameEstimation
:
public
Feature
<PointInT, PointOutT>
67
{
68
public
:
69
typedef
boost::shared_ptr<SHOTLocalReferenceFrameEstimation<PointInT, PointOutT> >
Ptr
;
70
typedef
boost::shared_ptr<const SHOTLocalReferenceFrameEstimation<PointInT, PointOutT> >
ConstPtr
;
71
/** \brief Constructor */
72
SHOTLocalReferenceFrameEstimation
()
73
{
74
feature_name_
=
"SHOTLocalReferenceFrameEstimation"
;
75
}
76
77
/** \brief Empty destructor */
78
virtual
~SHOTLocalReferenceFrameEstimation
() {}
79
80
protected
:
81
using
Feature<PointInT, PointOutT>::feature_name_
;
82
using
Feature<PointInT, PointOutT>::getClassName
;
83
//using Feature<PointInT, PointOutT>::searchForNeighbors;
84
using
Feature<PointInT, PointOutT>::input_
;
85
using
Feature<PointInT, PointOutT>::indices_
;
86
using
Feature<PointInT, PointOutT>::surface_
;
87
using
Feature<PointInT, PointOutT>::tree_
;
88
using
Feature<PointInT, PointOutT>::search_parameter_
;
89
90
typedef
typename
Feature<PointInT, PointOutT>::PointCloudIn
PointCloudIn
;
91
typedef
typename
Feature<PointInT, PointOutT>::PointCloudOut
PointCloudOut
;
92
93
/** \brief Computes disambiguated local RF for a point index
94
* \param[in] cloud input point cloud
95
* \param[in] search_radius the neighborhood radius
96
* \param[in] central_point the point from the input_ cloud at which the local RF is computed
97
* \param[in] indices the neighbours indices
98
* \param[in] dists the squared distances to the neighbours
99
* \param[out] rf reference frame to compute
100
*/
101
float
102
getLocalRF
(
const
int
&index, Eigen::Matrix3f &rf);
103
104
/** \brief Feature estimation method.
105
* \param[out] output the resultant features
106
*/
107
virtual
void
108
computeFeature
(
PointCloudOut
&output);
109
};
110
}
111
112
#ifdef PCL_NO_PRECOMPILE
113
#include <pcl/features/impl/shot_lrf.hpp>
114
#endif
115
116
#endif // PCL_FEATURES_SHOT_LRF_H_
117