Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
features
shot_lrf_omp.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2010-2012, Willow Garage, Inc.
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
* $Id$
38
*/
39
40
#pragma once
41
42
#include <
pcl/point_types.h
>
43
#include <pcl/features/feature.h>
44
#include <pcl/features/shot_lrf.h>
45
46
namespace
pcl
47
{
48
/** \brief SHOTLocalReferenceFrameEstimation estimates the Local Reference Frame used in the calculation
49
* of the (SHOT) descriptor.
50
*
51
* \note If you use this code in any academic work, please cite:
52
*
53
* - F. Tombari, S. Salti, L. Di Stefano
54
* Unique Signatures of Histograms for Local Surface Description.
55
* In Proceedings of the 11th European Conference on Computer Vision (ECCV),
56
* Heraklion, Greece, September 5-11 2010.
57
* - F. Tombari, S. Salti, L. Di Stefano
58
* A Combined Texture-Shape Descriptor For Enhanced 3D Feature Matching.
59
* In Proceedings of the 18th International Conference on Image Processing (ICIP),
60
* Brussels, Belgium, September 11-14 2011.
61
*
62
* \author Samuele Salti, Federico Tombari
63
* \ingroup features
64
*/
65
template
<
typename
Po
int
InT,
typename
Po
int
OutT = ReferenceFrame>
66
class
SHOTLocalReferenceFrameEstimationOMP
:
public
SHOTLocalReferenceFrameEstimation
<PointInT, PointOutT>
67
{
68
public
:
69
using
Ptr
= shared_ptr<SHOTLocalReferenceFrameEstimationOMP<PointInT, PointOutT> >;
70
using
ConstPtr
= shared_ptr<const SHOTLocalReferenceFrameEstimationOMP<PointInT, PointOutT> >;
71
/** \brief Constructor */
72
SHOTLocalReferenceFrameEstimationOMP
()
73
{
74
feature_name_
=
"SHOTLocalReferenceFrameEstimationOMP"
;
75
76
setNumberOfThreads
(0);
77
}
78
79
/** \brief Empty destructor */
80
~SHOTLocalReferenceFrameEstimationOMP
()
override
=
default
;
81
82
/** \brief Initialize the scheduler and set the number of threads to use.
83
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
84
*/
85
void
86
setNumberOfThreads
(
unsigned
int
nr_threads = 0);
87
88
protected
:
89
using
Feature
<PointInT, PointOutT>
::feature_name_
;
90
using
Feature
<PointInT, PointOutT>
::getClassName
;
91
//using Feature<PointInT, PointOutT>::searchForNeighbors;
92
using
Feature
<PointInT, PointOutT>
::input_
;
93
using
Feature
<PointInT, PointOutT>
::indices_
;
94
using
Feature
<PointInT, PointOutT>
::surface_
;
95
using
Feature
<PointInT, PointOutT>
::tree_
;
96
using
Feature
<PointInT, PointOutT>
::search_parameter_
;
97
using
SHOTLocalReferenceFrameEstimation
<PointInT, PointOutT>
::getLocalRF
;
98
using
PointCloudIn
=
typename
Feature<PointInT, PointOutT>::PointCloudIn
;
99
using
PointCloudOut
=
typename
Feature<PointInT, PointOutT>::PointCloudOut
;
100
101
/** \brief Feature estimation method.
102
* \param[out] output the resultant features
103
*/
104
void
105
computeFeature
(
PointCloudOut
&output)
override
;
106
107
/** \brief The number of threads the scheduler should use. */
108
unsigned
int
threads_
;
109
110
};
111
}
112
113
#ifdef PCL_NO_PRECOMPILE
114
#include <pcl/features/impl/shot_lrf_omp.hpp>
115
#endif
pcl::Feature
Feature represents the base feature class.
Definition
feature.h:107
pcl::Feature< PointInT, ReferenceFrame >::search_parameter_
double search_parameter_
Definition
feature.h:234
pcl::Feature< PointInT, ReferenceFrame >::getClassName
const std::string & getClassName() const
Definition
feature.h:244
pcl::Feature::PointCloudOut
pcl::PointCloud< PointOutT > PointCloudOut
Definition
feature.h:124
pcl::Feature< PointInT, ReferenceFrame >::feature_name_
std::string feature_name_
Definition
feature.h:220
pcl::Feature< PointInT, ReferenceFrame >::tree_
KdTreePtr tree_
Definition
feature.h:231
pcl::Feature< PointInT, ReferenceFrame >::surface_
PointCloudInConstPtr surface_
Definition
feature.h:228
pcl::Feature::PointCloudIn
pcl::PointCloud< PointInT > PointCloudIn
Definition
feature.h:120
pcl::PCLBase< PointInT >::input_
PointCloudConstPtr input_
Definition
pcl_base.h:147
pcl::PCLBase< PointInT >::indices_
IndicesPtr indices_
Definition
pcl_base.h:150
pcl::SHOTLocalReferenceFrameEstimation< PointInT, ReferenceFrame >::SHOTLocalReferenceFrameEstimation
SHOTLocalReferenceFrameEstimation()
Definition
shot_lrf.h:71
pcl::SHOTLocalReferenceFrameEstimation< PointInT, ReferenceFrame >::getLocalRF
float getLocalRF(const int &index, Eigen::Matrix3f &rf)
Definition
shot_lrf.hpp:50
pcl::SHOTLocalReferenceFrameEstimationOMP::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition
shot_lrf_omp.h:108
pcl::SHOTLocalReferenceFrameEstimationOMP::SHOTLocalReferenceFrameEstimationOMP
SHOTLocalReferenceFrameEstimationOMP()
Constructor.
Definition
shot_lrf_omp.h:72
pcl::SHOTLocalReferenceFrameEstimationOMP::ConstPtr
shared_ptr< const SHOTLocalReferenceFrameEstimationOMP< PointInT, PointOutT > > ConstPtr
Definition
shot_lrf_omp.h:70
pcl::SHOTLocalReferenceFrameEstimationOMP::~SHOTLocalReferenceFrameEstimationOMP
~SHOTLocalReferenceFrameEstimationOMP() override=default
Empty destructor.
pcl::SHOTLocalReferenceFrameEstimationOMP::Ptr
shared_ptr< SHOTLocalReferenceFrameEstimationOMP< PointInT, PointOutT > > Ptr
Definition
shot_lrf_omp.h:69
pcl::SHOTLocalReferenceFrameEstimationOMP::computeFeature
void computeFeature(PointCloudOut &output) override
Feature estimation method.
Definition
shot_lrf_omp.hpp:62
pcl::SHOTLocalReferenceFrameEstimationOMP::setNumberOfThreads
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition
shot_lrf_omp.hpp:48
pcl::SHOTLocalReferenceFrameEstimationOMP::PointCloudOut
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
Definition
shot_lrf_omp.h:99
pcl::SHOTLocalReferenceFrameEstimationOMP::PointCloudIn
typename Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
Definition
shot_lrf_omp.h:98
point_types.h
Defines all the PCL implemented PointT point type structures.
pcl
Definition
convolution.h:46