From 43d46c0e8b6a1aa027070575e92662f3e68a1077 Mon Sep 17 00:00:00 2001 From: "alexey.spizhevoy" Date: Mon, 6 Aug 2012 17:20:06 +0400 Subject: [PATCH] Minor fix in the DP based seam estimator --- modules/stitching/src/seam_finders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stitching/src/seam_finders.cpp b/modules/stitching/src/seam_finders.cpp index f1c21dc137..d59a2b2f01 100644 --- a/modules/stitching/src/seam_finders.cpp +++ b/modules/stitching/src/seam_finders.cpp @@ -925,7 +925,7 @@ void DpSeamFinder::updateLabelsUsingSeam(int c1, int c2, const vector &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;