Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
filters
fast_bilateral_omp.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
* Copyright (c) 2004, Sylvain Paris and Francois Sillion
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: fast_bilateral_omp.h 8379 2013-01-02 23:12:21Z sdmiller $
38
*
39
*/
40
41
#pragma once
42
43
#include <pcl/filters/filter.h>
44
#include <pcl/filters/fast_bilateral.h>
45
46
namespace
pcl
47
{
48
/** \brief Implementation of a fast bilateral filter for smoothing depth information in organized point clouds
49
* Based on the following paper:
50
* * Sylvain Paris and Fredo Durand
51
* "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach"
52
* European Conference on Computer Vision (ECCV'06)
53
*
54
* More details on the webpage: http://people.csail.mit.edu/sparis/bf/
55
*/
56
template
<
typename
Po
int
T>
57
class
FastBilateralFilterOMP
:
public
FastBilateralFilter
<PointT>
58
{
59
protected
:
60
using
FastBilateralFilter
<PointT>
::input_
;
61
using
FastBilateralFilter
<PointT>
::sigma_s_
;
62
using
FastBilateralFilter
<PointT>
::sigma_r_
;
63
using
FastBilateralFilter
<PointT>
::early_division_
;
64
using
Array3D
=
typename
FastBilateralFilter<PointT>::Array3D
;
65
66
using
PointCloud
=
typename
Filter<PointT>::PointCloud
;
67
68
public
:
69
70
using
Ptr
= shared_ptr<FastBilateralFilterOMP<PointT> >;
71
using
ConstPtr
= shared_ptr<const FastBilateralFilterOMP<PointT> >;
72
73
/** \brief Empty constructor. */
74
FastBilateralFilterOMP
(
unsigned
int
nr_threads = 0)
75
{
76
setNumberOfThreads
(nr_threads);
77
}
78
79
/** \brief Initialize the scheduler and set the number of threads to use.
80
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
81
*/
82
void
83
setNumberOfThreads
(
unsigned
int
nr_threads = 0);
84
85
/** \brief Filter the input data and store the results into output.
86
* \param[out] output the resultant point cloud
87
*/
88
void
89
applyFilter
(
PointCloud
&output)
override
;
90
91
protected
:
92
/** \brief The number of threads the scheduler should use. */
93
unsigned
int
threads_
;
94
95
};
96
}
97
98
#ifdef PCL_NO_PRECOMPILE
99
#include <pcl/filters/impl/fast_bilateral_omp.hpp>
100
#else
101
#define PCL_INSTANTIATE_FastBilateralFilterOMP(T) template class PCL_EXPORTS pcl::FastBilateralFilterOMP<T>;
102
#endif
pcl::FastBilateralFilter::Array3D
Definition
fast_bilateral.h:112
pcl::FastBilateralFilter::sigma_r_
float sigma_r_
Definition
fast_bilateral.h:108
pcl::FastBilateralFilter::sigma_s_
float sigma_s_
Definition
fast_bilateral.h:107
pcl::FastBilateralFilter::FastBilateralFilter
FastBilateralFilter()=default
Empty constructor.
pcl::FastBilateralFilter::early_division_
bool early_division_
Definition
fast_bilateral.h:109
pcl::FastBilateralFilterOMP::ConstPtr
shared_ptr< const FastBilateralFilterOMP< PointT > > ConstPtr
Definition
fast_bilateral_omp.h:71
pcl::FastBilateralFilterOMP::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition
fast_bilateral_omp.h:93
pcl::FastBilateralFilterOMP::setNumberOfThreads
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
Definition
fast_bilateral_omp.hpp:48
pcl::FastBilateralFilterOMP::applyFilter
void applyFilter(PointCloud &output) override
Filter the input data and store the results into output.
Definition
fast_bilateral_omp.hpp:62
pcl::FastBilateralFilterOMP::FastBilateralFilterOMP
FastBilateralFilterOMP(unsigned int nr_threads=0)
Empty constructor.
Definition
fast_bilateral_omp.h:74
pcl::FastBilateralFilterOMP::Ptr
shared_ptr< FastBilateralFilterOMP< PointT > > Ptr
Definition
fast_bilateral_omp.h:70
pcl::FastBilateralFilterOMP::Array3D
typename FastBilateralFilter< PointT >::Array3D Array3D
Definition
fast_bilateral_omp.h:64
pcl::FastBilateralFilterOMP::PointCloud
typename Filter< PointT >::PointCloud PointCloud
Definition
fast_bilateral_omp.h:66
pcl::Filter::PointCloud
pcl::PointCloud< PointT > PointCloud
Definition
filter.h:87
pcl::PCLBase::input_
PointCloudConstPtr input_
The input point cloud dataset.
Definition
pcl_base.h:147
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition
point_cloud.h:174
pcl
Definition
convolution.h:46