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