Point Cloud Library (PCL)
1.7.0
Main Page
Modules
Namespaces
Classes
features
include
pcl
features
pfh_tools.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2012-, Open Perception, Inc.
6
*
7
* All rights reserved.
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions
11
* are met:
12
*
13
* * Redistributions of source code must retain the above copyright
14
* notice, this list of conditions and the following disclaimer.
15
* * Redistributions in binary form must reproduce the above
16
* copyright notice, this list of conditions and the following
17
* disclaimer in the documentation and/or other materials provided
18
* with the distribution.
19
* * Neither the name of the copyright holder(s) nor the names of its
20
* contributors may be used to endorse or promote products derived
21
* from this software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
* POSSIBILITY OF SUCH DAMAGE.
35
*
36
*/
37
38
#ifndef PCL_FEATURES_PFH_TOOLS_H_
39
#define PCL_FEATURES_PFH_TOOLS_H_
40
41
#if defined __GNUC__
42
# pragma GCC system_header
43
#endif
44
45
#include <pcl/pcl_exports.h>
46
#include <Eigen/Core>
47
48
namespace
pcl
49
{
50
/** \brief Compute the 4-tuple representation containing the three angles and one distance between two points
51
* represented by Cartesian coordinates and normals.
52
* \note For explanations about the features, please see the literature mentioned above (the order of the
53
* features might be different).
54
* \param[in] p1 the first XYZ point
55
* \param[in] n1 the first surface normal
56
* \param[in] p2 the second XYZ point
57
* \param[in] n2 the second surface normal
58
* \param[out] f1 the first angular feature (angle between the projection of nq_idx and u)
59
* \param[out] f2 the second angular feature (angle between nq_idx and v)
60
* \param[out] f3 the third angular feature (angle between np_idx and |p_idx - q_idx|)
61
* \param[out] f4 the distance feature (p_idx - q_idx)
62
*
63
* \note For efficiency reasons, we assume that the point data passed to the method is finite.
64
* \ingroup features
65
*/
66
PCL_EXPORTS
bool
67
computePairFeatures
(
const
Eigen::Vector4f &p1,
const
Eigen::Vector4f &n1,
68
const
Eigen::Vector4f &p2,
const
Eigen::Vector4f &n2,
69
float
&f1,
float
&f2,
float
&f3,
float
&f4);
70
71
PCL_EXPORTS
bool
72
computeRGBPairFeatures
(
const
Eigen::Vector4f &p1,
const
Eigen::Vector4f &n1,
const
Eigen::Vector4i &colors1,
73
const
Eigen::Vector4f &p2,
const
Eigen::Vector4f &n2,
const
Eigen::Vector4i &colors2,
74
float
&f1,
float
&f2,
float
&f3,
float
&f4,
float
&f5,
float
&f6,
float
&f7);
75
76
}
77
78
#endif //#ifndef PCL_FEATURES_PFH_TOOLS_H_
79