From caf438c63b72e2a4ee4cc3deeb58762b707dc729 Mon Sep 17 00:00:00 2001 From: smirnov-alexey Date: Tue, 12 Feb 2019 18:36:06 +0300 Subject: [PATCH] Fixes an issue with valgrind and sobelxy --- modules/gapi/perf/common/gapi_imgproc_perf_tests_inl.hpp | 4 ++-- modules/gapi/test/common/gapi_imgproc_tests_inl.hpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/gapi/perf/common/gapi_imgproc_perf_tests_inl.hpp b/modules/gapi/perf/common/gapi_imgproc_perf_tests_inl.hpp index 3f364d6d76..e23bbd2e26 100644 --- a/modules/gapi/perf/common/gapi_imgproc_perf_tests_inl.hpp +++ b/modules/gapi/perf/common/gapi_imgproc_perf_tests_inl.hpp @@ -507,8 +507,8 @@ PERF_TEST_P_(SobelXYPerfTest, TestPerformance) cv::GCompileArgs compile_args; std::tie(cmpF, type, kernSize, sz, dtype, order, compile_args) = GetParam(); - cv::Mat out_mat_ocv2 = cv::Mat(sz, dtype); - cv::Mat out_mat_gapi2 = cv::Mat(sz, dtype); + cv::Mat out_mat_ocv2; + cv::Mat out_mat_gapi2; initMatsRandN(type, sz, dtype, false); diff --git a/modules/gapi/test/common/gapi_imgproc_tests_inl.hpp b/modules/gapi/test/common/gapi_imgproc_tests_inl.hpp index 0ca038707e..74d98d8c6e 100644 --- a/modules/gapi/test/common/gapi_imgproc_tests_inl.hpp +++ b/modules/gapi/test/common/gapi_imgproc_tests_inl.hpp @@ -361,9 +361,11 @@ TEST_P(SobelXYTest, AccuracyTest) cv::Size sz; cv::GCompileArgs compile_args; std::tie(cmpF, type, kernSize, sz, dtype, order, border_type, border_val, compile_args) = GetParam(); + + cv::Mat out_mat_ocv2; + cv::Mat out_mat_gapi2; + initMatsRandN(type, sz, dtype); - cv::Mat out_mat_ocv2 = cv::Mat(sz, dtype); - cv::Mat out_mat_gapi2 = cv::Mat(sz, dtype); // G-API code ////////////////////////////////////////////////////////////// cv::GMat in;