boost implementation of Boykov and Kolmogorov's maxflow algorithm doesn't support negative flows which makes it inappropriate for this context.
More...
#include <pcl/segmentation/grabcut_segmentation.h>
boost implementation of Boykov and Kolmogorov's maxflow algorithm doesn't support negative flows which makes it inappropriate for this context.
This implementation of Boykov and Kolmogorov's maxflow algorithm by Stephen Gould steph.nosp@m.en.g.nosp@m.ould@.nosp@m.anu..nosp@m.edu.a.nosp@m.u in DARWIN under BSD does the trick however solwer than original implementation.
Definition at line 63 of file grabcut_segmentation.h.
◆ capacitated_edge
◆ edge_capacity_type
◆ edge_pair
◆ vertex_descriptor
◆ nodestate
◆ BoykovKolmogorov()
pcl::segmentation::grabcut::BoykovKolmogorov::BoykovKolmogorov |
( |
std::size_t |
max_nodes = 0 | ) |
|
construct a maxflow/mincut problem with estimated max_nodes
◆ ~BoykovKolmogorov()
virtual pcl::segmentation::grabcut::BoykovKolmogorov::~BoykovKolmogorov |
( |
| ) |
|
|
virtualdefault |
◆ addConstant()
void pcl::segmentation::grabcut::BoykovKolmogorov::addConstant |
( |
double |
c | ) |
|
|
inline |
◆ addEdge()
void pcl::segmentation::grabcut::BoykovKolmogorov::addEdge |
( |
int |
u, |
|
|
int |
v, |
|
|
double |
cap_uv, |
|
|
double |
cap_vu = 0.0 |
|
) |
| |
add edge from u to v and edge from v to u (requires cap_uv + cap_vu >= 0)
◆ addNodes()
int pcl::segmentation::grabcut::BoykovKolmogorov::addNodes |
( |
std::size_t |
n = 1 | ) |
|
add nodes to the graph (returns the id of the first node added)
◆ addSourceEdge()
void pcl::segmentation::grabcut::BoykovKolmogorov::addSourceEdge |
( |
int |
u, |
|
|
double |
cap |
|
) |
| |
add edge from s to nodeId
◆ addTargetEdge()
void pcl::segmentation::grabcut::BoykovKolmogorov::addTargetEdge |
( |
int |
u, |
|
|
double |
cap |
|
) |
| |
add edge from nodeId to t
◆ adoptOrphans()
void pcl::segmentation::grabcut::BoykovKolmogorov::adoptOrphans |
( |
std::deque< int > & |
orphans | ) |
|
|
protected |
◆ augmentPath()
void pcl::segmentation::grabcut::BoykovKolmogorov::augmentPath |
( |
const std::pair< int, int > & |
path, |
|
|
std::deque< int > & |
orphans |
|
) |
| |
|
protected |
augment the path found by expandTrees; return orphaned subtrees
◆ clear()
void pcl::segmentation::grabcut::BoykovKolmogorov::clear |
( |
| ) |
|
clear the graph and internal datastructures
◆ clearActive()
void pcl::segmentation::grabcut::BoykovKolmogorov::clearActive |
( |
| ) |
|
|
protected |
◆ expandTrees()
std::pair<int, int> pcl::segmentation::grabcut::BoykovKolmogorov::expandTrees |
( |
| ) |
|
|
protected |
expand trees until a path is found (or no path (-1, -1))
◆ getSourceEdgeCapacity()
double pcl::segmentation::grabcut::BoykovKolmogorov::getSourceEdgeCapacity |
( |
int |
u | ) |
const |
◆ getTargetEdgeCapacity()
double pcl::segmentation::grabcut::BoykovKolmogorov::getTargetEdgeCapacity |
( |
int |
u | ) |
const |
◆ initializeTrees()
void pcl::segmentation::grabcut::BoykovKolmogorov::initializeTrees |
( |
| ) |
|
|
protected |
initialize trees from source and target
◆ inSinkTree()
bool pcl::segmentation::grabcut::BoykovKolmogorov::inSinkTree |
( |
int |
u | ) |
const |
|
inline |
◆ inSourceTree()
bool pcl::segmentation::grabcut::BoykovKolmogorov::inSourceTree |
( |
int |
u | ) |
const |
|
inline |
◆ isActive()
bool pcl::segmentation::grabcut::BoykovKolmogorov::isActive |
( |
int |
u | ) |
const |
|
inlineprotected |
◆ isActiveSetEmpty()
bool pcl::segmentation::grabcut::BoykovKolmogorov::isActiveSetEmpty |
( |
| ) |
const |
|
inlineprotected |
◆ markActive()
void pcl::segmentation::grabcut::BoykovKolmogorov::markActive |
( |
int |
u | ) |
|
|
protected |
◆ markInactive()
void pcl::segmentation::grabcut::BoykovKolmogorov::markInactive |
( |
int |
u | ) |
|
|
protected |
◆ numNodes()
std::size_t pcl::segmentation::grabcut::BoykovKolmogorov::numNodes |
( |
| ) |
const |
|
inline |
◆ operator()()
double pcl::segmentation::grabcut::BoykovKolmogorov::operator() |
( |
int |
u, |
|
|
int |
v |
|
) |
| const |
returns the residual capacity for an edge (use -1 for terminal (-1,-1) is the current flow
◆ preAugmentPaths()
void pcl::segmentation::grabcut::BoykovKolmogorov::preAugmentPaths |
( |
| ) |
|
|
protected |
pre-augment s-u-t and s-u-v-t paths
◆ reset()
void pcl::segmentation::grabcut::BoykovKolmogorov::reset |
( |
| ) |
|
reset all edge capacities to zero (but don't free the graph)
◆ solve()
double pcl::segmentation::grabcut::BoykovKolmogorov::solve |
( |
| ) |
|
solve the max-flow problem and return the flow
◆ cut_
std::vector<unsigned char> pcl::segmentation::grabcut::BoykovKolmogorov::cut_ |
|
protected |
◆ flow_value_
double pcl::segmentation::grabcut::BoykovKolmogorov::flow_value_ {0.0} |
|
protected |
◆ nodes_
std::vector<capacitated_edge> pcl::segmentation::grabcut::BoykovKolmogorov::nodes_ |
|
protected |
◆ source_edges_
std::vector<double> pcl::segmentation::grabcut::BoykovKolmogorov::source_edges_ |
|
protected |
◆ target_edges_
std::vector<double> pcl::segmentation::grabcut::BoykovKolmogorov::target_edges_ |
|
protected |
The documentation for this class was generated from the following file: