changed file path
This commit is contained in:
parent
2759f026e9
commit
280ecb68bf
@ -1697,13 +1697,18 @@ TEST(Imgproc_ColorBayerVNG, regression)
|
|||||||
cvtest::TS& ts = *cvtest::TS::ptr();
|
cvtest::TS& ts = *cvtest::TS::ptr();
|
||||||
|
|
||||||
Mat given = imread(string(ts.get_data_path()) + "/cvtcolor/bayer_input.png", CV_LOAD_IMAGE_GRAYSCALE);
|
Mat given = imread(string(ts.get_data_path()) + "/cvtcolor/bayer_input.png", CV_LOAD_IMAGE_GRAYSCALE);
|
||||||
Mat gold = imread(string(ts.get_data_path()) + "/cvtcolor/bayerVNG_gold.png", CV_LOAD_IMAGE_UNCHANGED);
|
string goldfname = string(ts.get_data_path()) + "/cvtcolor/bayerVNG_gold.png";
|
||||||
|
Mat gold = imread(goldfname, CV_LOAD_IMAGE_UNCHANGED);
|
||||||
Mat result;
|
Mat result;
|
||||||
|
|
||||||
CV_Assert(given.data != NULL);
|
CV_Assert(given.data != NULL);
|
||||||
|
|
||||||
cvtColor(given, result, CV_BayerBG2BGR_VNG, 3);
|
cvtColor(given, result, CV_BayerBG2BGR_VNG, 3);
|
||||||
|
|
||||||
|
if (gold.empty())
|
||||||
|
imwrite(goldfname, result);
|
||||||
|
else
|
||||||
|
{
|
||||||
EXPECT_EQ(gold.type(), result.type());
|
EXPECT_EQ(gold.type(), result.type());
|
||||||
EXPECT_EQ(gold.cols, result.cols);
|
EXPECT_EQ(gold.cols, result.cols);
|
||||||
EXPECT_EQ(gold.rows, result.rows);
|
EXPECT_EQ(gold.rows, result.rows);
|
||||||
@ -1713,13 +1718,14 @@ TEST(Imgproc_ColorBayerVNG, regression)
|
|||||||
|
|
||||||
EXPECT_EQ(0, countNonZero(diff.reshape(1) > 1));
|
EXPECT_EQ(0, countNonZero(diff.reshape(1) > 1));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TEST(Imgproc_ColorBayerVNG_Strict, regression)
|
TEST(Imgproc_ColorBayerVNG_Strict, regression)
|
||||||
{
|
{
|
||||||
cvtest::TS& ts = *cvtest::TS::ptr();
|
cvtest::TS& ts = *cvtest::TS::ptr();
|
||||||
const char pattern[][3] = { "bg", "gb", "rg", "gr" };
|
const char pattern[][3] = { "bg", "gb", "rg", "gr" };
|
||||||
const std::string image_name = "lena.png";
|
const std::string image_name = "lena.png";
|
||||||
const std::string parent_path = string(ts.get_data_path()) + "./cvtcolor_strict/";
|
const std::string parent_path = string(ts.get_data_path()) + "/cvtcolor_strict/";
|
||||||
|
|
||||||
Mat src, dst, bayer, reference;
|
Mat src, dst, bayer, reference;
|
||||||
std::string full_path = parent_path + image_name;
|
std::string full_path = parent_path + image_name;
|
||||||
@ -1730,6 +1736,7 @@ TEST(Imgproc_ColorBayerVNG_Strict, regression)
|
|||||||
{
|
{
|
||||||
ts.set_failed_test_info(cvtest::TS::FAIL_MISSING_TEST_DATA);
|
ts.set_failed_test_info(cvtest::TS::FAIL_MISSING_TEST_DATA);
|
||||||
ts.printf(cvtest::TS::SUMMARY, "No input image\n");
|
ts.printf(cvtest::TS::SUMMARY, "No input image\n");
|
||||||
|
ts.set_gtest_status();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user