pcl::graph Namespace Reference

Namespaces

 concepts
 
 detail
 
 terms
 

Classes

class  EdgeWeightComputer
 This class computes edge weights for a given point cloud graph. More...
 
class  GraphBuilder
 This is an abstract base class for building a BGL-compatible point cloud graph from a point cloud. More...
 
class  NearestNeighborsGraphBuilder
 This class builds a point cloud graph representing an input dataset by using nearest neighbor search. More...
 
class  point_cloud_graph
 
struct  point_cloud_graph_traits
 Traits struct to access the types associated with point_cloud_graph. More...
 
struct  point_cloud_graph_traits< boost::subgraph< Graph > >
 Specialization for point_cloud_graphs wrapped in boost::subgraph. More...
 
class  point_cloud_property_map
 This class is to expose the point cloud stored in the point_cloud_graph as a vertex bundle property map. More...
 
struct  remove_edge_if
 remove_edge_if structure is an "extended" version of, boost::remove_edge_if that incorporates a workaround to allow edge removal from both plain graphs and subgraphs. More...
 
struct  remove_edge_if< Graph, typename boost::enable_if< detail::has_root_graph< Graph > >::type >
 
class  VoxelGridGraphBuilder
 This class builds a BGL graph representing an input dataset by using octree::OctreePointCloud. More...
 

Functions

template<typename Graph >
void computeNormalsAndCurvatures (Graph &graph, bool neighborhood_1ring=false)
 Compute normals and curvatures for all vertices in a graph. More...
 
template<typename Graph >
void computeSignedCurvatures (Graph &graph)
 Compute the type of curvature (concave/convex) for each vertex. More...
 
template<typename Graph , typename ColorMap >
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. More...
 
template<typename Graph >
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. More...
 
template<typename Graph >
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, and the other containing the remaining points. More...
 
template<typename Graph >
void createSubgraphsFromIndices (Graph &graph, const std::vector< pcl::PointIndices > &indices, std::vector< boost::reference_wrapper< Graph > > &subgraphs)
 Create subgraphs of a given graph containing vertices from a given indices vector. More...
 
template<PCG_PARAMS >
pcl::PointIndices::Ptr indices (const boost::subgraph< PCG > &g)
 Retrieve the indices of the points of the point cloud stored in a point cloud (sub)graph that actually belong to the (sub)graph. More...
 
template<PCG_PARAMS >
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 belong to the graph. More...
 
template<PCG_PARAMS >
pcl::PointCloud< P >::Ptr point_cloud (boost::subgraph< PCG > &g)
 Retrieve the point cloud stored in a point cloud (sub)graph. More...
 
template<PCG_PARAMS >
pcl::PointCloud< P >::ConstPtr point_cloud (const boost::subgraph< PCG > &g)
 Retrieve the point cloud stored in a point cloud (sub)graph (const version). More...
 
template<PCG_PARAMS >
pcl::PointCloud< P >::ConstPtr point_cloud (const PCG &g)
 Retrieve the point cloud stored in a point cloud graph (const version). More...
 
template<PCG_PARAMS >
pcl::PointCloud< P >::Ptr point_cloud (PCG &g)
 Retrieve the point cloud stored in a point cloud graph. More...
 
template<typename Graph >
void smoothen (Graph &graph, float spatial_sigma, float influence_sigma)
 Apply bilateral filtering to a given point cloud graph. More...
 

Function Documentation

◆ computeNormalsAndCurvatures()

void computeNormalsAndCurvatures ( Graph &  graph,
bool  neighborhood_1ring = false 
)

Compute normals and curvatures for all vertices in a graph.

For each vertex the function finds its 1- or 2-ring neighbors and uses pcl::computePointNormal() to calculate normal and curvature. It also flips the calculated normal towards 0,0,0 viewpoint.

Graph has to be a model of concepts::PointCloudGraphConcept.

Parameters
[in]neighborhood_1ringflag which controls whether 1- or 2- ring neighborhood is used. Default is 2-ring, which is slower, but produces smoother normals.
Author
Sergey Alexandrov

Definition at line 55 of file common.hpp.

+ Here is the call graph for this function:

◆ computeSignedCurvatures()

void computeSignedCurvatures ( Graph &  graph)

Compute the type of curvature (concave/convex) for each vertex.

The type of curvature is expressed through the sign. Convex curvature is positive and concave curvature is negative. The absolute values of curvatures are not altered by this function.

TODO: add the formula.

Graph has to be a model of concepts::PointCloudGraphConcept.

Author
Sergey Alexandrov

Definition at line 111 of file common.hpp.

+ Here is the call graph for this function:

◆ 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.

Each created subgraph is filled with the vertices that have the same color according to the color map. Consequently, the number of created subgraphs is equal to the number of unique colors in the provided map. The subgraphs are guaranteed to be sorted in the increasing order of the color.

In order to allow creation of subgraphs, the graph type should be an instantiation of boost::subgraph template. Note that the graph is passed by non-const reference, because subgraph creation modifies the parent graph. Also, note that the created subgraphs are output as references wrapped with boost::reference_wrapper. The reason is that the factory function for subgraph creation in BGL returns newly created subgraphs by reference.

Parameters
[in]graphan input graph
[in]color_mapa color map that defines vertex colors
[out]subgraphsa vector of references to created subgraps
Returns
the number of created subgraphs
Author
Sergey Alexandrov

Definition at line 163 of file common.hpp.

+ Here is the call graph for this function:

◆ 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.

Each created subgraph is filled with the vertices that belong to the corresponding connected component.

In order to allow creation of subgraphs, the graph type should be an instantiation of boost::subgraph template. Note that the graph is passed by non-const reference, because subgraph creation modifies the parent graph. Also, note that the created subgraphs are output as references wrapped with boost::reference_wrapper. The reason is that the factory function for subgraph creation in BGL returns newly created subgraphs by reference.

Parameters
[in]graphan input graph
[out]subgraphsa vector of references to created subgraps
Returns
the number of connected components
Author
Sergey Alexandrov

Definition at line 142 of file common.hpp.

+ Here is the call graph for this function:

◆ createSubgraphsFromIndices() [1/2]

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, and the other containing the remaining points.

In order to allow creation of subgraphs, the graph type should be an instantiation of boost::subgraph template. Note that the graph is passed by non-const reference, because subgraph creation modifies the parent graph. Also, note that the created subgraphs are output as references wrapped with boost::reference_wrapper. The reason is that the factory function for subgraph creation in BGL returns newly created subgraphs by reference.

Parameters
[in]graphan input graph
[in]indicesindices of points to be inserted in the first subgraph
[out]subgraphsa vector of references to created subgraps
Author
Sergey Alexandrov

Definition at line 199 of file common.hpp.

+ Here is the call graph for this function:

◆ createSubgraphsFromIndices() [2/2]

void createSubgraphsFromIndices ( Graph &  graph,
const std::vector< pcl::PointIndices > &  indices,
std::vector< boost::reference_wrapper< Graph > > &  subgraphs 
)

Create subgraphs of a given graph containing vertices from a given indices vector.

For each set of indices in the indices vector this function will create a subgraph containing corresponding vertices of the parent graph. An additional subgraph containing all the remaining vertices (not included in any other subgraph) will be created as well.

In order to allow creation of subgraphs, the graph type should be an instantiation of boost::subgraph template. Note that the graph is passed by non-const reference, because subgraph creation modifies the parent graph. Also, note that the created subgraphs are output as references wrapped with boost::reference_wrapper. The reason is that the factory function for subgraph creation in BGL returns newly created subgraphs by reference.

Parameters
[in]graphan input graph
[in]indicesa vector of indices of points to be inserted in the subgraphs
[out]subgraphsa vector of references to created subgraps
Author
Sergey Alexandrov

Definition at line 228 of file common.hpp.

+ Here is the call graph for this function:

◆ indices() [1/2]

pcl::PointIndices::Ptr pcl::graph::indices ( const boost::subgraph< PCG > &  g)
inline

Retrieve the indices of the points of the point cloud stored in a point cloud (sub)graph that actually belong to the (sub)graph.

A child subgraph contains only a subset of the vertices of the parent graph. This function provides a vector of indices of the vertices of the parent graph that belong to this subgraph as well. These vertex indices are valid point indices for the point cloud stored in the parent graph.

Author
Sergey Alexandrov

Definition at line 788 of file point_cloud_graph.h.

+ Here is the call graph for this function:

◆ indices() [2/2]

pcl::PointIndices::Ptr pcl::graph::indices ( const PCG g)
inline

Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually belong to the graph.

Since point_cloud_graph always contain all the points that it stores, this function always returns a vector with indices from 0 to N-1, where N is the number of vertices (points) in the graph.

Author
Sergey Alexandrov

Definition at line 737 of file point_cloud_graph.h.

+ Here is the caller graph for this function:

◆ point_cloud() [1/4]

pcl::PointCloud<P>::Ptr pcl::graph::point_cloud ( boost::subgraph< PCG > &  g)
inline

Retrieve the point cloud stored in a point cloud (sub)graph.

The behavior of this function will be different for root and child subgraphs. A root subgraph will return the point cloud stored in it, whereas a child subgraph will return the point cloud stored in its parent graph.

Author
Sergey Alexandrov

Definition at line 759 of file point_cloud_graph.h.

◆ point_cloud() [2/4]

pcl::PointCloud<P>::ConstPtr pcl::graph::point_cloud ( const boost::subgraph< PCG > &  g)
inline

Retrieve the point cloud stored in a point cloud (sub)graph (const version).

Author
Sergey Alexandrov

Definition at line 771 of file point_cloud_graph.h.

◆ point_cloud() [3/4]

pcl::PointCloud<P>::ConstPtr pcl::graph::point_cloud ( const PCG g)
inline

Retrieve the point cloud stored in a point cloud graph (const version).

Author
Sergey Alexandrov

Definition at line 721 of file point_cloud_graph.h.

◆ point_cloud() [4/4]

pcl::PointCloud<P>::Ptr pcl::graph::point_cloud ( PCG g)
inline

Retrieve the point cloud stored in a point cloud graph.

Author
Sergey Alexandrov

Definition at line 710 of file point_cloud_graph.h.

+ Here is the caller graph for this function:

◆ smoothen()

void smoothen ( Graph &  graph,
float  spatial_sigma,
float  influence_sigma 
)

Apply bilateral filtering to a given point cloud graph.

Graph has to be a model of concepts::PointCloudGraphConcept.

Author
Sergey Alexandrov

Definition at line 259 of file common.hpp.

+ Here is the call graph for this function: