Point Cloud Library (PCL) 1.15.0
Loading...
Searching...
No Matches
cppf.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 * Copyright (c) 2013, Martin Szarski
8 *
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * * Redistributions in binary form must reproduce the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer in the documentation and/or other materials provided
20 * with the distribution.
21 * * Neither the name of the copyright holder(s) nor the names of its
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 *
38 */
39
40#pragma once
41
42#include <pcl/features/feature.h>
43
44namespace pcl
45{
46 /** \brief
47 * \param[in] p1
48 * \param[in] n1
49 * \param[in] p2
50 * \param[in] n2
51 * \param[in] c1
52 * \param[in] c2
53 * \param[out] f1
54 * \param[out] f2
55 * \param[out] f3
56 * \param[out] f4
57 * \param[out] f5
58 * \param[out] f6
59 * \param[out] f7
60 * \param[out] f8
61 * \param[out] f9
62 * \param[out] f10
63 */
64 PCL_EXPORTS bool
65 computeCPPFPairFeature (const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4i &c1,
66 const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, const Eigen::Vector4i &c2,
67 float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7, float &f8, float &f9, float &f10);
68
69
70
71 /** \brief Class that calculates the "surflet" features for each pair in the given
72 * pointcloud. Please refer to the following publication for more details:
73 * C. Choi, Henrik Christensen
74 * 3D Pose Estimation of Daily Objects Using an RGB-D Camera
75 * Proceedings of IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)
76 * 2012
77 *
78 * PointOutT is meant to be pcl::CPPFSignature - contains the 10 values of the Surflet
79 * feature and in addition, alpha_m for the respective pair - optimization proposed by
80 * the authors (see above)
81 *
82 * \author Martin Szarski, Alexandru-Eugen Ichim
83 */
84
85 template <typename PointInT, typename PointNT, typename PointOutT>
86 class CPPFEstimation : public FeatureFromNormals<PointInT, PointNT, PointOutT>
87 {
88 public:
89 using Ptr = shared_ptr<CPPFEstimation<PointInT, PointNT, PointOutT> >;
90 using ConstPtr = shared_ptr<const CPPFEstimation<PointInT, PointNT, PointOutT> >;
91 using PCLBase<PointInT>::indices_;
92 using Feature<PointInT, PointOutT>::input_;
93 using Feature<PointInT, PointOutT>::feature_name_;
94 using Feature<PointInT, PointOutT>::getClassName;
95 using FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_;
96
98
99 /** \brief Empty Constructor. */
101
102
103 private:
104 /** \brief The method called for actually doing the computations
105 * \param[out] output the resulting point cloud (which should be of type pcl::CPPFSignature);
106 * its size is the size of the input cloud, squared (i.e., one point for each pair in
107 * the input cloud);
108 */
109 void
110 computeFeature (PointCloudOut &output) override;
111 };
112}
113
114#ifdef PCL_NO_PRECOMPILE
115#include <pcl/features/impl/cppf.hpp>
116#endif
Class that calculates the "surflet" features for each pair in the given pointcloud.
Definition cppf.h:87
shared_ptr< const CPPFEstimation< PointInT, PointNT, PointOutT > > ConstPtr
Definition cppf.h:90
shared_ptr< CPPFEstimation< PointInT, PointNT, PointOutT > > Ptr
Definition cppf.h:89
CPPFEstimation()
Empty Constructor.
Definition cppf.hpp:49
PointCloudNConstPtr normals_
A pointer to the input dataset that contains the point normals of the XYZ dataset.
Definition feature.h:349
Feature represents the base feature class.
Definition feature.h:107
const std::string & getClassName() const
Get a string representation of the name of this class.
Definition feature.h:244
std::string feature_name_
The feature name.
Definition feature.h:220
PCL base class.
Definition pcl_base.h:70
PointCloudConstPtr input_
The input point cloud dataset.
Definition pcl_base.h:147
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition pcl_base.h:150
PCL_EXPORTS bool computeCPPFPairFeature(const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4i &c1, const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, const Eigen::Vector4i &c2, float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7, float &f8, float &f9, float &f10)