mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 11:03:03 +08:00
Fixed uniniitialized mats in tests, added operator<< for compare_f
This commit is contained in:
parent
11eafca3e2
commit
858ba6c798
@ -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)
|
|||||||
|
|
||||||
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:
|
|||||||
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)
|
|||||||
{
|
{
|
||||||
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)
|
|||||||
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)
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user