common.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2014-, Open Perception, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of the copyright holder(s) nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
38 #ifndef PCL_GRAPH_COMMON_H
39 #define PCL_GRAPH_COMMON_H
40 
41 #include <boost/ref.hpp>
42 
43 #include <pcl/PointIndices.h>
44 
45 namespace pcl::graph
46 {
47 
62  template <typename Graph> void
63  computeNormalsAndCurvatures(Graph& graph, bool neighborhood_1ring = false);
64 
65 
78  template <typename Graph> void
80 
81 
104  template <typename Graph> size_t
106  std::vector<boost::reference_wrapper<Graph> >& subgraphs);
107 
108 
135  template <typename Graph, typename ColorMap> size_t
137  ColorMap color_map,
138  std::vector<boost::reference_wrapper<Graph> >& subgraphs);
139 
140 
159  template <typename Graph> void
161  const pcl::PointIndices& indices,
162  std::vector<boost::reference_wrapper<Graph> >& subgraphs);
163 
164 
188  template <typename Graph> void
190  const std::vector<pcl::PointIndices>& indices,
191  std::vector<boost::reference_wrapper<Graph> >& subgraphs);
192 
193 
200  template <typename Graph> void
201  smoothen(Graph& graph, float spatial_sigma, float influence_sigma);
202 
203 }
204 
205 
206 
207 #include "common.hpp"
208 
209 #endif /* PCL_GRAPH_COMMON_H */
210 
pcl::graph::createSubgraphsFromColorMap
size_t createSubgraphsFromColorMap(Graph &graph, ColorMap color_map, std::vector< boost::reference_wrapper< Graph > > &subgraphs)
Split a given graph into subgraphs based on the values in a given vertex color map.
Definition: common.hpp:163
pcl::graph::smoothen
void smoothen(Graph &graph, float spatial_sigma, float influence_sigma)
Apply bilateral filtering to a given point cloud graph.
Definition: common.hpp:259
common.hpp
pcl::graph::computeNormalsAndCurvatures
void computeNormalsAndCurvatures(Graph &graph, bool neighborhood_1ring=false)
Compute normals and curvatures for all vertices in a graph.
Definition: common.hpp:55
pcl::graph::createSubgraphsFromConnectedComponents
size_t createSubgraphsFromConnectedComponents(Graph &graph, std::vector< boost::reference_wrapper< Graph > > &subgraphs)
Find connected components in a graph and create a subgraph for each of them.
Definition: common.hpp:142
pcl::graph
Definition: common.h:45
pcl::graph::indices
pcl::PointIndices::Ptr indices(const PCG &g)
Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually bel...
Definition: point_cloud_graph.h:737
armarx::Graph
boost::subgraph< CloudGraph > Graph
Definition: Common.h:54
pcl::graph::computeSignedCurvatures
void computeSignedCurvatures(Graph &graph)
Compute the type of curvature (concave/convex) for each vertex.
Definition: common.hpp:111
ColorMap
Definition: color.h:10
pcl::graph::createSubgraphsFromIndices
void createSubgraphsFromIndices(Graph &graph, const pcl::PointIndices &indices, std::vector< boost::reference_wrapper< Graph > > &subgraphs)
Create two subgraphs of a given graph, one containing the points with the given indices,...
Definition: common.hpp:199