diff --git a/modules/gpu/test/test_labeling.cpp b/modules/gpu/test/test_labeling.cpp index 46f6f4eeba..d32dbc1a2f 100644 --- a/modules/gpu/test/test_labeling.cpp +++ b/modules/gpu/test/test_labeling.cpp @@ -139,10 +139,9 @@ namespace { if ( (_labels.at(j,i) == gpu.at(j,i + 1)) && (diff.at(j, i) != diff.at(j,i + 1))) { outliers++; - // std::cout << j << " " << i << " " << _labels.at(j,i) << " " << gpu.at(j,i + 1) << " " << diff.at(j, i) << " " << diff.at(j,i + 1) << std::endl; } } - ASSERT_FALSE(outliers); + ASSERT_TRUE(outliers < gpu.cols + gpu.rows); } cv::Mat image; @@ -162,7 +161,7 @@ struct Labeling : testing::TestWithParam cv::Mat loat_image() { - return cv::imread(std::string( cvtest::TS::ptr()->get_data_path() ) + "labeling/IMG_0727.JPG"); + return cv::imread(std::string( cvtest::TS::ptr()->get_data_path() ) + "labeling/label.png"); } }; @@ -189,10 +188,6 @@ TEST_P(Labeling, ConnectedComponents) ASSERT_NO_THROW(cv::gpu::labelComponents(mask, components)); host.checkCorrectness(cv::Mat(components)); - cv::imshow("test", image); - cv::waitKey(0); - cv::imshow("test", host._labels); - cv::waitKey(0); } INSTANTIATE_TEST_CASE_P(ConnectedComponents, Labeling, ALL_DEVICES);