diff --git a/modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp b/modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp index 64ace29c5f..ae5a03260e 100644 --- a/modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp +++ b/modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp @@ -1678,6 +1678,7 @@ PERF_TEST_P_(LUTPerfTest, TestPerformance) initMatrixRandU(type_mat, sz_in, type_out); cv::Size sz_lut = cv::Size(1, 256); cv::Mat in_lut(sz_lut, type_lut); + cv::randu(in_lut, cv::Scalar::all(0), cv::Scalar::all(255)); // OpenCV code /////////////////////////////////////////////////////////// cv::LUT(in_mat1, in_lut, out_mat_ocv); diff --git a/modules/gapi/test/common/gapi_core_tests_inl.hpp b/modules/gapi/test/common/gapi_core_tests_inl.hpp index c226edd505..6b80680d0e 100644 --- a/modules/gapi/test/common/gapi_core_tests_inl.hpp +++ b/modules/gapi/test/common/gapi_core_tests_inl.hpp @@ -1373,7 +1373,8 @@ TEST_P(LUTTest, AccuracyTest) initMatrixRandU(type_mat, sz_in, type_out); cv::Size sz_lut = cv::Size(1, 256); - cv::Mat in_lut (sz_lut, type_lut); + cv::Mat in_lut(sz_lut, type_lut); + cv::randu(in_lut, cv::Scalar::all(0), cv::Scalar::all(255)); // G-API code ////////////////////////////////////////////////////////////// cv::GMat in; diff --git a/modules/gapi/test/common/gapi_tests_common.hpp b/modules/gapi/test/common/gapi_tests_common.hpp index 864e2cdfc4..29911b46dc 100644 --- a/modules/gapi/test/common/gapi_tests_common.hpp +++ b/modules/gapi/test/common/gapi_tests_common.hpp @@ -377,6 +377,12 @@ public: private: double _tol; }; +} // namespace opencv_test - +namespace +{ + inline std::ostream& operator<<(std::ostream& os, const opencv_test::compare_f&) + { + return os << "compare_f"; + } } diff --git a/modules/gapi/test/gapi_scalar_tests.cpp b/modules/gapi/test/gapi_scalar_tests.cpp index 4c2a4f4ab5..7b4baa01d0 100644 --- a/modules/gapi/test/gapi_scalar_tests.cpp +++ b/modules/gapi/test/gapi_scalar_tests.cpp @@ -16,6 +16,7 @@ TEST(GAPI_Scalar, Argument) { cv::Size sz(2, 2); cv::Mat in_mat(sz, CV_8U); + cv::randn(in_mat, cv::Scalar::all(127), cv::Scalar::all(40.f)); cv::GComputationT mulS([](cv::GMat in, cv::GScalar c) { diff --git a/modules/gapi/test/internal/gapi_int_recompilation_test.cpp b/modules/gapi/test/internal/gapi_int_recompilation_test.cpp index ced7324071..4d8bd87d4f 100644 --- a/modules/gapi/test/internal/gapi_int_recompilation_test.cpp +++ b/modules/gapi/test/internal/gapi_int_recompilation_test.cpp @@ -193,6 +193,7 @@ TEST(GComputationCompile, ReshapeRois) cv::GComputation cc(in, cv::gapi::resize(blurred, szOut)); cv::Mat first_in_mat(8, 8, CV_8UC3); + cv::randn(first_in_mat, cv::Scalar::all(127), cv::Scalar::all(40.f)); cv::Mat first_out_mat; auto fluidKernels = cv::gapi::combine(gapi::imgproc::fluid::kernels(), gapi::core::fluid::kernels(), @@ -206,6 +207,7 @@ TEST(GComputationCompile, ReshapeRois) int width = 4 + 2*i; int height = width; cv::Mat in_mat(width, height, CV_8UC3); + cv::randn(in_mat, cv::Scalar::all(127), cv::Scalar::all(40.f)); cv::Mat out_mat = cv::Mat::zeros(szOut, CV_8UC3); int x = 0;