1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
5 // Copyright (C) 2018-2019 Intel Corporation
8 #include "test_precomp.hpp"
9 #include "../common/gapi_operators_tests.hpp"
11 #define CORE_FLUID cv::gapi::core::fluid::kernels()
16 INSTANTIATE_TEST_CASE_P(MathOperatorTestFluid, MathOperatorMatMatTest,
17 Combine(Values(AbsExact().to_compare_f()),
18 Values( opPlusM, opMinusM, opDivM,
19 opGreater, opLess, opGreaterEq, opLessEq, opEq, opNotEq),
20 Values(CV_8UC1, CV_16SC1, CV_32FC1),
21 Values(cv::Size(1280, 720),
24 Values(-1, CV_8U, CV_32F),
25 /*init output matrices or not*/ testing::Bool(),
26 Values(cv::compile_args(CORE_FLUID))));
28 //FIXME: Some Mat/Scalar Fluid kernels are not there yet!
29 INSTANTIATE_TEST_CASE_P(DISABLED_MathOperatorTestFluid, MathOperatorMatScalarTest,
30 Combine(Values(AbsExact().to_compare_f()),
31 Values( opPlus, opPlusR, opMinus, opMinusR, opMul, opMulR, // FIXIT avoid division by values near zero: opDiv, opDivR,
32 opGT, opLT, opGE, opLE, opEQ, opNE,
33 opGTR, opLTR, opGER, opLER, opEQR, opNER),
34 Values(CV_8UC1, CV_16SC1, CV_32FC1),
35 Values(cv::Size(1280, 720),
38 Values(-1, CV_8U, CV_32F),
39 /*init output matrices or not*/ testing::Bool(),
40 Values(cv::compile_args(CORE_FLUID))));
42 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestFluid, MathOperatorMatMatTest,
43 Combine(Values(AbsExact().to_compare_f()),
44 Values( opAnd, opOr, opXor ),
45 Values(CV_8UC1, CV_16UC1, CV_16SC1),
46 Values(cv::Size(1280, 720),
50 /*init output matrices or not*/ testing::Bool(),
51 Values(cv::compile_args(CORE_FLUID))));
53 //FIXME: Some Mat/Scalar Fluid kernels are not there yet!
54 INSTANTIATE_TEST_CASE_P(DISABLED_BitwiseOperatorTestFluid, MathOperatorMatScalarTest,
55 Combine(Values(AbsExact().to_compare_f()),
56 Values( opAND, opOR, opXOR, opANDR, opORR, opXORR ),
57 Values(CV_8UC1, CV_16UC1, CV_16SC1),
58 Values(cv::Size(1280, 720),
62 /*init output matrices or not*/ testing::Bool(),
63 Values(cv::compile_args(CORE_FLUID))));
65 INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestFluid, NotOperatorTest,
66 Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
67 Values(cv::Size(1280, 720),
70 /*init output matrices or not*/ testing::Bool(),
71 Values(cv::compile_args(CORE_FLUID))));