gapi_operators_tests_fluid.cpp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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.
  4. //
  5. // Copyright (C) 2018 Intel Corporation
  6. #include "../test_precomp.hpp"
  7. #include "../common/gapi_operators_tests.hpp"
  8. namespace
  9. {
  10. #define CORE_FLUID [] () { return cv::compile_args(cv::gapi::use_only{cv::gapi::core::fluid::kernels()}); }
  11. } // anonymous namespace
  12. namespace opencv_test
  13. {
  14. INSTANTIATE_TEST_CASE_P(MathOperatorTestFluid, MathOperatorMatMatTest,
  15. Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
  16. Values(cv::Size(1280, 720),
  17. cv::Size(640, 480),
  18. cv::Size(128, 128)),
  19. Values(-1),
  20. Values(CORE_FLUID),
  21. Values(AbsExact().to_compare_obj()),
  22. Values( ADD, SUB, DIV,
  23. GT, LT, GE, LE, EQ, NE)));
  24. INSTANTIATE_TEST_CASE_P(MathOperatorArithmeticTestFluid, MathOperatorMatScalarTest,
  25. Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
  26. Values(cv::Size(1280, 720),
  27. cv::Size(640, 480),
  28. cv::Size(128, 128)),
  29. Values(-1),
  30. Values(CORE_FLUID),
  31. Values(AbsExact().to_compare_obj()),
  32. Values( ADD, SUB, MUL, DIV,
  33. ADDR, SUBR, MULR, DIVR)));
  34. // FIXME: solve comparison error
  35. INSTANTIATE_TEST_CASE_P(MathOperatorCompareTestFluid, MathOperatorMatScalarTest,
  36. Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
  37. Values(cv::Size(1280, 720),
  38. cv::Size(640, 480),
  39. cv::Size(128, 128)),
  40. Values(-1),
  41. Values(CORE_FLUID),
  42. Values(AbsSimilarPoints(1, 0.01).to_compare_obj()),
  43. Values( GT, LT, GE, LE, EQ, NE,
  44. GTR, LTR, GER, LER, EQR, NER)));
  45. INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestFluid, MathOperatorMatMatTest,
  46. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  47. Values(cv::Size(1280, 720),
  48. cv::Size(640, 480),
  49. cv::Size(128, 128)),
  50. Values(-1),
  51. Values(CORE_FLUID),
  52. Values(AbsExact().to_compare_obj()),
  53. Values( AND, OR, XOR )));
  54. INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestFluid, MathOperatorMatScalarTest,
  55. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  56. Values(cv::Size(1280, 720),
  57. cv::Size(640, 480),
  58. cv::Size(128, 128)),
  59. Values(-1),
  60. Values(CORE_FLUID),
  61. Values(AbsExact().to_compare_obj()),
  62. Values( AND, OR, XOR,
  63. ANDR, ORR, XORR )));
  64. INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestFluid, NotOperatorTest,
  65. Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
  66. Values(cv::Size(1280, 720),
  67. cv::Size(640, 480),
  68. cv::Size(128, 128)),
  69. Values(-1),
  70. Values(CORE_FLUID)));
  71. }