Fixed loop in buildPyramid in deepflow.cpp

The while loop in member function buildPyramid in deepflow.cpp terminated as a result of the break statement and never as a result of the termination criteria because the "i" variable in the while loop was never incremented.

Changed the while loop into a for loop

Changed the while loop into a for loop in the member function buildPyramid in deepFlow.cpp

removed trailing whitespace
pull/1222/head
Diego 8 years ago committed by ceroytres
parent 09b73b2dc7
commit fbbda575de
  1. 3
      modules/optflow/src/deepflow.cpp

@ -97,8 +97,7 @@ std::vector<Mat> OpticalFlowDeepFlow::buildPyramid( const Mat& src )
std::vector<Mat> pyramid;
pyramid.push_back(src);
Mat prev = pyramid[0];
int i = 0;
while ( i < this->maxLayers )
for( int i = 0; i < this->maxLayers; ++i)
{
Mat next; //TODO: filtering at each level?
Size nextSize((int) (prev.cols * downscaleFactor + 0.5f),

Loading…
Cancel
Save