Point Cloud Library (PCL)
1.14.1-dev
|
Multilabel graph segmentation using random walks. More...
#include <pcl/segmentation/impl/random_walker.hpp>
Public Types | |
using | Color = typename boost::property_traits< VertexColorMap >::value_type |
using | Weight = typename boost::property_traits< EdgeWeightMap >::value_type |
using | GraphTraits = boost::graph_traits< Graph > |
using | EdgeDescriptor = typename GraphTraits::edge_descriptor |
using | VertexDescriptor = typename GraphTraits::vertex_descriptor |
using | EdgeIterator = typename GraphTraits::edge_iterator |
using | OutEdgeIterator = typename GraphTraits::out_edge_iterator |
using | VertexIterator = typename GraphTraits::vertex_iterator |
using | VertexIndexMap = typename boost::property_map< Graph, boost::vertex_index_t >::type |
using | VertexDegreeMap = boost::iterator_property_map< typename std::vector< Weight >::iterator, VertexIndexMap > |
using | SparseMatrix = Eigen::SparseMatrix< Weight > |
using | Matrix = Eigen::Matrix< Weight, Eigen::Dynamic, Eigen::Dynamic > |
using | Vector = Eigen::Matrix< Weight, Eigen::Dynamic, 1 > |
Public Member Functions | |
RandomWalker (Graph &g, EdgeWeightMap weights, VertexColorMap colors) | |
bool | segment () |
void | computeVertexDegrees () |
void | buildLinearSystem () |
bool | solveLinearSystem () |
void | assignColors () |
void | getPotentials (Matrix &potentials, std::map< Color, std::size_t > &color_to_column_map) |
Static Public Member Functions | |
template<typename T > | |
static std::size_t | insertInBimap (boost::bimap< std::size_t, T > &bimap, T value) |
Public Attributes | |
Graph & | g_ |
EdgeWeightMap | weight_map_ |
VertexColorMap | color_map_ |
VertexIndexMap | index_map_ |
std::vector< VertexDescriptor > | seeds_ |
std::set< Color > | colors_ |
std::vector< Weight > | degree_storage_ |
VertexDegreeMap | degree_map_ |
SparseMatrix | L |
SparseMatrix | B |
Matrix | X |
boost::bimap< std::size_t, VertexDescriptor > | L_vertex_bimap |
boost::bimap< std::size_t, Color > | B_color_bimap |
Multilabel graph segmentation using random walks.
This is an implementation of the algorithm described in "Random Walks for Image Segmentation" by Leo Grady.
See the documentation of the randomWalker() function for details.
Definition at line 65 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::Color = typename boost::property_traits<VertexColorMap>::value_type |
Definition at line 70 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::EdgeDescriptor = typename GraphTraits::edge_descriptor |
Definition at line 73 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::EdgeIterator = typename GraphTraits::edge_iterator |
Definition at line 75 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::GraphTraits = boost::graph_traits<Graph> |
Definition at line 72 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::Matrix = Eigen::Matrix<Weight, Eigen::Dynamic, Eigen::Dynamic> |
Definition at line 81 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::OutEdgeIterator = typename GraphTraits::out_edge_iterator |
Definition at line 76 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::SparseMatrix = Eigen::SparseMatrix<Weight> |
Definition at line 80 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::Vector = Eigen::Matrix<Weight, Eigen::Dynamic, 1> |
Definition at line 82 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::VertexDegreeMap = boost::iterator_property_map<typename std::vector<Weight>::iterator, VertexIndexMap> |
Definition at line 79 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::VertexDescriptor = typename GraphTraits::vertex_descriptor |
Definition at line 74 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::VertexIndexMap = typename boost::property_map<Graph, boost::vertex_index_t>::type |
Definition at line 78 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::VertexIterator = typename GraphTraits::vertex_iterator |
Definition at line 77 of file random_walker.hpp.
using pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::Weight = typename boost::property_traits<EdgeWeightMap>::value_type |
Definition at line 71 of file random_walker.hpp.
|
inline |
Definition at line 84 of file random_walker.hpp.
|
inline |
Definition at line 209 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B_color_bimap, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::color_map_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L_vertex_bimap, and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::X.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::solveLinearSystem().
|
inline |
Definition at line 116 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B_color_bimap, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::color_map_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::colors_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::degree_map_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::g_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::insertInBimap(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L_vertex_bimap, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::seeds_, and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::weight_map_.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::segment().
|
inline |
Definition at line 103 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::degree_map_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::g_, and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::weight_map_.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::segment().
|
inline |
Definition at line 224 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B_color_bimap, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::color_map_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::colors_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::g_, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::insertInBimap(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L_vertex_bimap, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::seeds_, and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::X.
|
inlinestatic |
|
inline |
Definition at line 95 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::buildLinearSystem(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::computeVertexDegrees(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::solveLinearSystem().
|
inline |
Definition at line 185 of file random_walker.hpp.
References pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::assignColors(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B, pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L, and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::X.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::segment().
SparseMatrix pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B |
boost::bimap<std::size_t, Color> pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::B_color_bimap |
Definition at line 273 of file random_walker.hpp.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::assignColors(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::buildLinearSystem(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::getPotentials().
VertexColorMap pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::color_map_ |
Definition at line 258 of file random_walker.hpp.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::assignColors(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::buildLinearSystem(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::getPotentials().
std::set<Color> pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::colors_ |
VertexDegreeMap pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::degree_map_ |
std::vector<Weight> pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::degree_storage_ |
Definition at line 264 of file random_walker.hpp.
Graph& pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::g_ |
Definition at line 256 of file random_walker.hpp.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::buildLinearSystem(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::computeVertexDegrees(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::getPotentials().
VertexIndexMap pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::index_map_ |
Definition at line 259 of file random_walker.hpp.
SparseMatrix pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L |
boost::bimap<std::size_t, VertexDescriptor> pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::L_vertex_bimap |
Definition at line 271 of file random_walker.hpp.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::assignColors(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::buildLinearSystem(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::getPotentials().
std::vector<VertexDescriptor> pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::seeds_ |
EdgeWeightMap pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::weight_map_ |
Matrix pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::X |
Definition at line 268 of file random_walker.hpp.
Referenced by pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::assignColors(), pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::getPotentials(), and pcl::segmentation::detail::RandomWalker< Graph, EdgeWeightMap, VertexColorMap >::solveLinearSystem().