1.x related fixes
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user