Minor fix in the DP based seam estimator

This commit is contained in:
alexey.spizhevoy 2012-08-06 17:20:06 +04:00 committed by Alexey Spizhevoy
parent 7222f2724f
commit 43d46c0e8b

View File

@ -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;