Point Cloud Library (PCL)  1.12.0
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 #pragma once
39 
40 #if defined __GNUC__
41 # pragma GCC system_header
42 #endif
43 
44 #include <pcl/pcl_exports.h>
45 #include <Eigen/Core>
46 
47 namespace pcl
48 {
49  /** \brief Compute the 4-tuple representation containing the three angles and one distance between two points
50  * represented by Cartesian coordinates and normals.
51  * \note For explanations about the features, please see the literature mentioned above (the order of the
52  * features might be different).
53  * \param[in] p1 the first XYZ point
54  * \param[in] n1 the first surface normal
55  * \param[in] p2 the second XYZ point
56  * \param[in] n2 the second surface normal
57  * \param[out] f1 the first angular feature (angle between the projection of nq_idx and u)
58  * \param[out] f2 the second angular feature (angle between nq_idx and v)
59  * \param[out] f3 the third angular feature (angle between np_idx and |p_idx - q_idx|)
60  * \param[out] f4 the distance feature (p_idx - q_idx)
61  *
62  * \note For efficiency reasons, we assume that the point data passed to the method is finite.
63  * \ingroup features
64  */
65  PCL_EXPORTS bool
66  computePairFeatures (const Eigen::Vector4f &p1, const Eigen::Vector4f &n1,
67  const Eigen::Vector4f &p2, const Eigen::Vector4f &n2,
68  float &f1, float &f2, float &f3, float &f4);
69 
70  PCL_EXPORTS bool
71  computeRGBPairFeatures (const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4i &colors1,
72  const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, const Eigen::Vector4i &colors2,
73  float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7);
74 
75 }
PCL_EXPORTS bool computePairFeatures(const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, float &f1, float &f2, float &f3, float &f4)
Compute the 4-tuple representation containing the three angles and one distance between two points re...
PCL_EXPORTS bool computeRGBPairFeatures(const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4i &colors1, const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, const Eigen::Vector4i &colors2, float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7)
#define PCL_EXPORTS
Definition: pcl_macros.h:323