This commit is contained in:
marina.kolpakova 2012-08-07 14:25:27 +04:00
parent bcb499328d
commit e8e7b94443

View 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);