Merge pull request #18488 from alalek:maxflow_missing_check

pull/18497/head^2
Alexander Alekhin 4 years ago
commit a5b8f163d7
  1. 2
      modules/imgproc/src/gcgraph.hpp

@ -152,6 +152,8 @@ void GCGraph<TWeight>::addTermWeights( int i, TWeight sourceW, TWeight sinkW )
template <class TWeight>
TWeight GCGraph<TWeight>::maxFlow()
{
CV_Assert(!vtcs.empty());
CV_Assert(!edges.empty());
const int TERMINAL = -1, ORPHAN = -2;
Vtx stub, *nilNode = &stub, *first = nilNode, *last = nilNode;
int curr_ts = 0;

Loading…
Cancel
Save