Point Cloud Library (PCL)
1.7.2
Main Page
Modules
Namespaces
Classes
filters
include
pcl
filters
morphological_filter.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2009-2012, Willow Garage, Inc.
6
* Copyright (c) 2012-, Open Perception, Inc.
7
* Copyright (c) 2014, RadiantBlue Technologies, Inc.
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
* $Id$
39
*
40
*/
41
42
#ifndef PCL_FILTERS_MORPHOLOGICAL_FILTER_H_
43
#define PCL_FILTERS_MORPHOLOGICAL_FILTER_H_
44
45
#include <string>
46
#include <pcl/pcl_base.h>
47
#include <pcl/PointIndices.h>
48
#include <pcl/conversions.h>
49
#include <locale>
50
51
namespace
pcl
52
{
53
enum
MorphologicalOperators
54
{
55
MORPH_OPEN
,
56
MORPH_CLOSE
,
57
MORPH_DILATE
,
58
MORPH_ERODE
59
};
60
}
61
62
namespace
pcl
63
{
64
/** \brief Apply morphological operator to the z dimension of the input point cloud
65
* \param[in] cloud_in the input point cloud dataset
66
* \param[in] resolution the window size to be used for the morphological operation
67
* \param[in] morphological_operator the morphological operator to apply (open, close, dilate, erode)
68
* \param[out] cloud_out the resultant output point cloud dataset
69
* \ingroup filters
70
*/
71
template
<
typename
Po
int
T> PCL_EXPORTS
void
72
applyMorphologicalOperator
(
const
typename
pcl::PointCloud<PointT>::ConstPtr
&cloud_in,
73
float
resolution,
const
int
morphological_operator,
74
pcl::PointCloud<PointT>
&cloud_out);
75
}
76
77
#ifdef PCL_NO_PRECOMPILE
78
#include <pcl/filters/impl/morphological_filter.hpp>
79
#endif
80
81
#endif //#ifndef PCL_FILTERS_MORPHOLOGICAL_FILTER_H_
82