From 97cab339d2e7c26d745470f40b84e29a1cad458d Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Thu, 1 Nov 2012 23:59:01 +0400 Subject: [PATCH] fix Connected Components Labeling test crash --- modules/gpu/test/test_labeling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/test/test_labeling.cpp b/modules/gpu/test/test_labeling.cpp index 4eccbf93d6..c56fc0ef83 100644 --- a/modules/gpu/test/test_labeling.cpp +++ b/modules/gpu/test/test_labeling.cpp @@ -135,7 +135,7 @@ namespace { int outliers = 0; for (int j = 0; j < image.rows; ++j) - for (int i = 0; i < image.cols; ++i) + for (int i = 0; i < image.cols - 1; ++i) { if ( (_labels.at(j,i) == gpu.at(j,i + 1)) && (diff.at(j, i) != diff.at(j,i + 1))) {