1.x related fixes

This commit is contained in:
marina.kolpakova
2012-08-09 18:48:25 +04:00
parent 3f68e5bb0e
commit 40c76b9de2
6 changed files with 594 additions and 415 deletions

View File

@@ -164,7 +164,7 @@ struct Labeling : testing::TestWithParam<cv::gpu::DeviceInfo>
cv::Mat loat_image()
{
return cv::imread(std::string( cvtest::TS::ptr()->get_data_path() ) + "labeling/label.png");
return cv::imread(std::string( cvtest::TS::ptr()->get_data_path() ) + "labeling/IMG_0727.JPG");
}
};
@@ -173,6 +173,8 @@ TEST_P(Labeling, ConnectedComponents)
cv::Mat image;
cvtColor(loat_image(), image, CV_BGR2GRAY);
cv::threshold(image, image, 150, 255, CV_THRESH_BINARY);
ASSERT_TRUE(image.type() == CV_8UC1);
GreedyLabeling host(image);
@@ -189,6 +191,10 @@ 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);