Commit 75a6eaf1 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #13024 from rgarnov:gapi_fix_lut_test

parents 10e1c2b3 858ba6c7
...@@ -1678,6 +1678,7 @@ PERF_TEST_P_(LUTPerfTest, TestPerformance) ...@@ -1678,6 +1678,7 @@ PERF_TEST_P_(LUTPerfTest, TestPerformance)
initMatrixRandU(type_mat, sz_in, type_out); initMatrixRandU(type_mat, sz_in, type_out);
cv::Size sz_lut = cv::Size(1, 256); 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));
// OpenCV code /////////////////////////////////////////////////////////// // OpenCV code ///////////////////////////////////////////////////////////
cv::LUT(in_mat1, in_lut, out_mat_ocv); cv::LUT(in_mat1, in_lut, out_mat_ocv);
......
...@@ -1373,7 +1373,8 @@ TEST_P(LUTTest, AccuracyTest) ...@@ -1373,7 +1373,8 @@ TEST_P(LUTTest, AccuracyTest)
initMatrixRandU(type_mat, sz_in, type_out); initMatrixRandU(type_mat, sz_in, type_out);
cv::Size sz_lut = cv::Size(1, 256); 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 ////////////////////////////////////////////////////////////// // G-API code //////////////////////////////////////////////////////////////
cv::GMat in; cv::GMat in;
......
...@@ -377,6 +377,12 @@ public: ...@@ -377,6 +377,12 @@ public:
private: private:
double _tol; 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) ...@@ -16,6 +16,7 @@ TEST(GAPI_Scalar, Argument)
{ {
cv::Size sz(2, 2); cv::Size sz(2, 2);
cv::Mat in_mat(sz, CV_8U); 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) cv::GComputationT<cv::GMat (cv::GMat, cv::GScalar)> mulS([](cv::GMat in, cv::GScalar c)
{ {
......
...@@ -193,6 +193,7 @@ TEST(GComputationCompile, ReshapeRois) ...@@ -193,6 +193,7 @@ TEST(GComputationCompile, ReshapeRois)
cv::GComputation cc(in, cv::gapi::resize(blurred, szOut)); cv::GComputation cc(in, cv::gapi::resize(blurred, szOut));
cv::Mat first_in_mat(8, 8, CV_8UC3); 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; cv::Mat first_out_mat;
auto fluidKernels = cv::gapi::combine(gapi::imgproc::fluid::kernels(), auto fluidKernels = cv::gapi::combine(gapi::imgproc::fluid::kernels(),
gapi::core::fluid::kernels(), gapi::core::fluid::kernels(),
...@@ -206,6 +207,7 @@ TEST(GComputationCompile, ReshapeRois) ...@@ -206,6 +207,7 @@ TEST(GComputationCompile, ReshapeRois)
int width = 4 + 2*i; int width = 4 + 2*i;
int height = width; int height = width;
cv::Mat in_mat(width, height, CV_8UC3); 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); cv::Mat out_mat = cv::Mat::zeros(szOut, CV_8UC3);
int x = 0; int x = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment