Fixed uniniitialized mats in tests, added operator<< for compare_f

pull/13024/head
Ruslan Garnov 6 years ago
parent 11eafca3e2
commit 858ba6c798
  1. 1
      modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
  2. 3
      modules/gapi/test/common/gapi_core_tests_inl.hpp
  3. 8
      modules/gapi/test/common/gapi_tests_common.hpp
  4. 1
      modules/gapi/test/gapi_scalar_tests.cpp
  5. 2
      modules/gapi/test/internal/gapi_int_recompilation_test.cpp

@ -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);

@ -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;

@ -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";
}
}

@ -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<cv::GMat (cv::GMat, cv::GScalar)> mulS([](cv::GMat in, cv::GScalar c)
{

@ -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;

Loading…
Cancel
Save