mirror of
https://github.com/opencv/opencv.git
synced 2025-07-31 18:07:08 +08:00
Merge pull request #18488 from alalek:maxflow_missing_check
This commit is contained in:
commit
a5b8f163d7
@ -152,6 +152,8 @@ void GCGraph<TWeight>::addTermWeights( int i, TWeight sourceW, TWeight sinkW )
|
|||||||
template <class TWeight>
|
template <class TWeight>
|
||||||
TWeight GCGraph<TWeight>::maxFlow()
|
TWeight GCGraph<TWeight>::maxFlow()
|
||||||
{
|
{
|
||||||
|
CV_Assert(!vtcs.empty());
|
||||||
|
CV_Assert(!edges.empty());
|
||||||
const int TERMINAL = -1, ORPHAN = -2;
|
const int TERMINAL = -1, ORPHAN = -2;
|
||||||
Vtx stub, *nilNode = &stub, *first = nilNode, *last = nilNode;
|
Vtx stub, *nilNode = &stub, *first = nilNode, *last = nilNode;
|
||||||
int curr_ts = 0;
|
int curr_ts = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user