Commit fbbda575 authored by Diego's avatar Diego Committed by ceroytres

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
parent 09b73b2d
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment