Point Cloud Library (PCL)
1.7.0
Main Page
Modules
Namespaces
Classes
features
include
pcl
features
ppf.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
*/
38
39
#ifndef PCL_PPF_H_
40
#define PCL_PPF_H_
41
42
#include <pcl/features/feature.h>
43
#include <pcl/features/boost.h>
44
45
namespace
pcl
46
{
47
/** \brief
48
* \param[in] p1
49
* \param[in] n1
50
* \param[in] p2
51
* \param[in] n2
52
* \param[out] f1
53
* \param[out] f2
54
* \param[out] f3
55
* \param[out] f4
56
*/
57
PCL_EXPORTS
bool
58
computePPFPairFeature
(
const
Eigen::Vector4f &p1,
const
Eigen::Vector4f &n1,
59
const
Eigen::Vector4f &p2,
const
Eigen::Vector4f &n2,
60
float
&f1,
float
&f2,
float
&f3,
float
&f4);
61
62
63
/** \brief Class that calculates the "surflet" features for each pair in the given
64
* pointcloud. Please refer to the following publication for more details:
65
* B. Drost, M. Ulrich, N. Navab, S. Ilic
66
* Model Globally, Match Locally: Efficient and Robust 3D Object Recognition
67
* 2010 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)
68
* 13-18 June 2010, San Francisco, CA
69
*
70
* PointOutT is meant to be pcl::PPFSignature - contains the 4 values of the Surflet
71
* feature and in addition, alpha_m for the respective pair - optimization proposed by
72
* the authors (see above)
73
*
74
* \author Alexandru-Eugen Ichim
75
*/
76
template
<
typename
Po
int
InT,
typename
Po
int
NT,
typename
Po
int
OutT>
77
class
PPFEstimation
:
public
FeatureFromNormals
<PointInT, PointNT, PointOutT>
78
{
79
public
:
80
typedef
boost::shared_ptr<PPFEstimation<PointInT, PointNT, PointOutT> >
Ptr
;
81
typedef
boost::shared_ptr<const PPFEstimation<PointInT, PointNT, PointOutT> >
ConstPtr
;
82
using
PCLBase<PointInT>::indices_
;
83
using
Feature<PointInT, PointOutT>::input_
;
84
using
Feature<PointInT, PointOutT>::feature_name_
;
85
using
Feature<PointInT, PointOutT>::getClassName
;
86
using
FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_
;
87
88
typedef
pcl::PointCloud<PointOutT>
PointCloudOut
;
89
90
/** \brief Empty Constructor. */
91
PPFEstimation
();
92
93
94
private
:
95
/** \brief The method called for actually doing the computations
96
* \param[out] output the resulting point cloud (which should be of type pcl::PPFSignature);
97
* its size is the size of the input cloud, squared (i.e., one point for each pair in
98
* the input cloud);
99
*/
100
void
101
computeFeature (
PointCloudOut
&output);
102
};
103
}
104
105
#ifdef PCL_NO_PRECOMPILE
106
#include <pcl/features/impl/ppf.hpp>
107
#endif
108
109
#endif // PCL_PPF_H_