Point Cloud Library (PCL)  1.9.1
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 
42 #ifndef PCL_FILTERS_FAST_BILATERAL_OMP_H_
43 #define PCL_FILTERS_FAST_BILATERAL_OMP_H_
44 
45 #include <pcl/filters/filter.h>
46 #include <pcl/filters/fast_bilateral.h>
47 
48 namespace pcl
49 {
50  /** \brief Implementation of a fast bilateral filter for smoothing depth information in organized point clouds
51  * Based on the following paper:
52  * * Sylvain Paris and FrŽdo Durand
53  * "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach"
54  * European Conference on Computer Vision (ECCV'06)
55  *
56  * More details on the webpage: http://people.csail.mit.edu/sparis/bf/
57  */
58  template<typename PointT>
60  {
61  protected:
67 
69 
70  public:
71 
72  typedef boost::shared_ptr< FastBilateralFilterOMP<PointT> > Ptr;
73  typedef boost::shared_ptr< const FastBilateralFilterOMP<PointT> > ConstPtr;
74 
75  /** \brief Empty constructor. */
76  FastBilateralFilterOMP (unsigned int nr_threads = 0)
77  {
78  setNumberOfThreads(nr_threads);
79  }
80 
81  /** \brief Initialize the scheduler and set the number of threads to use.
82  * \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
83  */
84  void
85  setNumberOfThreads (unsigned int nr_threads = 0);
86 
87  /** \brief Filter the input data and store the results into output.
88  * \param[out] output the resultant point cloud
89  */
90  void
91  applyFilter (PointCloud &output);
92 
93  protected:
94  /** \brief The number of threads the scheduler should use. */
95  unsigned int threads_;
96 
97  };
98 }
99 
100 #ifdef PCL_NO_PRECOMPILE
101 #include <pcl/filters/impl/fast_bilateral_omp.hpp>
102 #else
103 #define PCL_INSTANTIATE_FastBilateralFilterOMP(T) template class PCL_EXPORTS pcl::FastBilateralFilterOMP<T>;
104 #endif
105 
106 
107 #endif /* PCL_FILTERS_FAST_BILATERAL_OMP_H_ */
108 
pcl::FastBilateralFilter
Implementation of a fast bilateral filter for smoothing depth information in organized point clouds B...
Definition: fast_bilateral.h:58
pcl::FastBilateralFilterOMP::Array3D
FastBilateralFilter< PointT >::Array3D Array3D
Definition: fast_bilateral_omp.h:66
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::FastBilateralFilterOMP::Ptr
boost::shared_ptr< FastBilateralFilterOMP< PointT > > Ptr
Definition: fast_bilateral_omp.h:72
pcl::FastBilateralFilterOMP::PointCloud
Filter< PointT >::PointCloud PointCloud
Definition: fast_bilateral_omp.h:68
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition: projection_matrix.h:53
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:50
pcl::FastBilateralFilterOMP
Implementation of a fast bilateral filter for smoothing depth information in organized point clouds B...
Definition: fast_bilateral_omp.h:59
pcl::FastBilateralFilterOMP::threads_
unsigned int threads_
The number of threads the scheduler should use.
Definition: fast_bilateral_omp.h:95
pcl::FastBilateralFilter::Array3D
Definition: fast_bilateral.h:117
pcl::FastBilateralFilterOMP::ConstPtr
boost::shared_ptr< const FastBilateralFilterOMP< PointT > > ConstPtr
Definition: fast_bilateral_omp.h:73
pcl::FastBilateralFilterOMP::FastBilateralFilterOMP
FastBilateralFilterOMP(unsigned int nr_threads=0)
Empty constructor.
Definition: fast_bilateral_omp.h:76
pcl::FastBilateralFilterOMP::applyFilter
void applyFilter(PointCloud &output)
Filter the input data and store the results into output.
Definition: fast_bilateral_omp.hpp:64