calib3d/imgproc: add GCGraph::maxFlow() missing empty checks
This commit is contained in:
parent
969b55036f
commit
c6b63e0e28
@ -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…
Reference in New Issue
Block a user