test fix
authormarina.kolpakova <marina.kolpakova@itseez.com>
Tue, 7 Aug 2012 10:25:27 +0000 (14:25 +0400)
committermarina.kolpakova <marina.kolpakova@itseez.com>
Tue, 7 Aug 2012 14:23:18 +0000 (18:23 +0400)
modules/gpu/test/test_labeling.cpp

index 6ba0ef5..b8c654e 100644 (file)
@@ -72,22 +72,15 @@ TEST_P(Labeling, ConnectedComponents)
 
     cv::gpu::connectivityMask(cv::gpu::GpuMat(image), mask, cv::Scalar::all(0), cv::Scalar::all(2));
 
-    cv::gpu::labelComponents(mask, components);
+    ASSERT_NO_THROW(cv::gpu::labelComponents(mask, components));
 
-    // std::cout << cv::Mat(components) << std::endl;
+    // for debug
     // cv::imshow("test", image);
     // cv::waitKey(0);
-
-    // for(int i = 0; i + 32 < image.rows; i += 32)
-    //     for(int j = 0; j + 32 < image.cols; j += 32)
-    //         cv::rectangle(image, cv::Rect(j, i, 32, 32) , CV_RGB(255, 255, 255));
-
-    cv::imshow("test", image);
-    cv::waitKey(0);
-    cv::imshow("test", cv::Mat(mask) * 10);
-    cv::waitKey(0);
-    cv::imshow("test", cv::Mat(components) * 2);
-    cv::waitKey(0);
+    // cv::imshow("test", cv::Mat(mask) * 10);
+    // cv::waitKey(0);
+    // cv::imshow("test", cv::Mat(components) * 2);
+    // cv::waitKey(0);
 }
 
 INSTANTIATE_TEST_CASE_P(ConnectedComponents, Labeling, ALL_DEVICES);
\ No newline at end of file