1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #14945 from andrey-golubev:delete_bool

G-API: clean up accuracy tests (#14945)

* Delete createOutputMatrices flag

Update the way compile args function is created

Fix instantiation suffix print function

* Update comment (NB)

* Make printable comparison functions

* Use defines instead of objects for compile args

* Remove custom printers, use operator<< overload

* Remove SAME_TYPE and use -1 instead

* Delete createOutputMatrices flag in new tests

* Fix GetParam() printed values

* Update Resize tests: use CompareF object

* Address code review feedback

* Add default cases for operator<< overloads

* change throw to GAPI_Assert
This commit is contained in:
Andrey Golubev
2019-07-16 19:04:18 +03:00
committed by Alexander Alekhin
parent c11423df1e
commit c9bd43c0f6
15 changed files with 424 additions and 597 deletions
@@ -10,7 +10,7 @@
namespace
{
#define CORE_GPU [] () { return cv::compile_args(cv::gapi::core::gpu::kernels()); }
#define CORE_GPU [] () { return cv::compile_args(cv::gapi::core::gpu::kernels()); }
} // anonymous namespace
namespace opencv_test
@@ -22,9 +22,8 @@ INSTANTIATE_TEST_CASE_P(MathOperatorTestGPU, MathOperatorMatMatTest,
cv::Size(640, 480),
cv::Size(128, 128)),
Values(-1, CV_8U, CV_32F),
testing::Bool(),
Values(CORE_GPU),
Values(Tolerance_FloatRel_IntAbs(1e-5, 2).to_compare_f()),
Values(Tolerance_FloatRel_IntAbs(1e-5, 2).to_compare_obj()),
Values( opPlusM, opMinusM, opDivM,
opGreater, opLess, opGreaterEq, opLessEq, opEq, opNotEq)));
@@ -34,9 +33,8 @@ INSTANTIATE_TEST_CASE_P(MathOperatorTestGPU, MathOperatorMatScalarTest,
cv::Size(640, 480),
cv::Size(128, 128)),
Values(-1, CV_8U, CV_32F),
/*init output matrices or not*/ testing::Bool(),
Values(CORE_GPU),
Values(Tolerance_FloatRel_IntAbs(1e-4, 2).to_compare_f()),
Values(Tolerance_FloatRel_IntAbs(1e-4, 2).to_compare_obj()),
Values( opPlus, opPlusR, opMinus, opMinusR, opMul, opMulR, // FIXIT avoid division by values near zero: opDiv, opDivR,
opGT, opLT, opGE, opLE, opEQ, opNE,
opGTR, opLTR, opGER, opLER, opEQR, opNER)));
@@ -47,9 +45,8 @@ INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestGPU, MathOperatorMatMatTest,
cv::Size(640, 480),
cv::Size(128, 128)),
Values(-1),
/*init output matrices or not*/ testing::Bool(),
Values(CORE_GPU),
Values(AbsExact().to_compare_f()),
Values(AbsExact().to_compare_obj()),
Values( opAnd, opOr, opXor )));
INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestGPU, MathOperatorMatScalarTest,
@@ -58,9 +55,8 @@ INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestGPU, MathOperatorMatScalarTest,
cv::Size(640, 480),
cv::Size(128, 128)),
Values(-1),
/*init output matrices or not*/ testing::Bool(),
Values(CORE_GPU),
Values(AbsExact().to_compare_f()),
Values(AbsExact().to_compare_obj()),
Values( opAND, opOR, opXOR, opANDR, opORR, opXORR )));
INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestGPU, NotOperatorTest,
@@ -68,7 +64,6 @@ INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestGPU, NotOperatorTest,
Values(cv::Size(1280, 720),
cv::Size(640, 480),
cv::Size(128, 128)),
Values(SAME_TYPE),
/*init output matrices or not*/ testing::Bool(),
Values(-1),
Values(CORE_GPU)));
}