From 14ee306b9ec7c4dcd09014b8480d85a955c7706f Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 3 Dec 2013 15:55:10 +0400 Subject: [PATCH] fix gpu test for Demosaicing: check that input images was loaded correctly --- modules/gpu/test/test_color.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/gpu/test/test_color.cpp b/modules/gpu/test/test_color.cpp index 4bd53c9194..3f5a37fd03 100644 --- a/modules/gpu/test/test_color.cpp +++ b/modules/gpu/test/test_color.cpp @@ -2357,6 +2357,7 @@ struct Demosaicing : testing::TestWithParam GPU_TEST_P(Demosaicing, BayerBG2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(1, 1)); @@ -2370,6 +2371,7 @@ GPU_TEST_P(Demosaicing, BayerBG2BGR) GPU_TEST_P(Demosaicing, BayerGB2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(0, 1)); @@ -2383,6 +2385,7 @@ GPU_TEST_P(Demosaicing, BayerGB2BGR) GPU_TEST_P(Demosaicing, BayerRG2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(0, 0)); @@ -2396,6 +2399,7 @@ GPU_TEST_P(Demosaicing, BayerRG2BGR) GPU_TEST_P(Demosaicing, BayerGR2BGR) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(1, 0)); @@ -2409,6 +2413,7 @@ GPU_TEST_P(Demosaicing, BayerGR2BGR) GPU_TEST_P(Demosaicing, BayerBG2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(1, 1)); @@ -2422,6 +2427,7 @@ GPU_TEST_P(Demosaicing, BayerBG2BGR_MHT) GPU_TEST_P(Demosaicing, BayerGB2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(0, 1)); @@ -2435,6 +2441,7 @@ GPU_TEST_P(Demosaicing, BayerGB2BGR_MHT) GPU_TEST_P(Demosaicing, BayerRG2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(0, 0)); @@ -2448,6 +2455,7 @@ GPU_TEST_P(Demosaicing, BayerRG2BGR_MHT) GPU_TEST_P(Demosaicing, BayerGR2BGR_MHT) { cv::Mat img = readImage("stereobm/aloe-L.png"); + ASSERT_FALSE(img.empty()) << "Can't load input image"; cv::Mat_ src; mosaic(img, src, cv::Point(1, 0));