Commit 43d46c0e authored by alexey.spizhevoy's avatar alexey.spizhevoy Committed by Alexey Spizhevoy

Minor fix in the DP based seam estimator

parent 7222f272
......@@ -925,7 +925,7 @@ void DpSeamFinder::updateLabelsUsingSeam(int c1, int c2, const vector<Point> &se
int c = x + dx[j];
int r = y + dy[j];
if (c > 0 && c < mask.cols && r > 0 && r < mask.rows &&
if (c >= 0 && c < mask.cols && r >= 0 && r < mask.rows &&
mask(r, c) && mask(r, c) != 255)
{
ok = true;
......
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