perf_inRange.cpp 708 B

1234567891011121314151617181920212223242526
  1. #include "perf_precomp.hpp"
  2. namespace opencv_test
  3. {
  4. using namespace perf;
  5. #define TYPICAL_MAT_TYPES_INRANGE CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_32FC4
  6. #define TYPICAL_MATS_INRANGE testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_INRANGE))
  7. PERF_TEST_P(Size_MatType, inRange, TYPICAL_MATS_INRANGE)
  8. {
  9. Size size = get<0>(GetParam());
  10. int type = get<1>(GetParam());
  11. Mat src1(size, type);
  12. Mat src2(size, type);
  13. Mat src3(size, type);
  14. Mat dst(size, type);
  15. declare.in(src1, src2, src3, WARMUP_RNG).out(dst);
  16. TEST_CYCLE() inRange( src1, src2, src3, dst );
  17. SANITY_CHECK(dst);
  18. }
  19. } // namespace