test_detectors_invariance.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #include "test_precomp.hpp"
  5. #include "test_invariance_utils.hpp"
  6. #include "test_detectors_invariance.impl.hpp"
  7. namespace opencv_test { namespace {
  8. const static std::string IMAGE_TSUKUBA = "features2d/tsukuba.png";
  9. const static std::string IMAGE_BIKES = "detectors_descriptors_evaluation/images_datasets/bikes/img1.png";
  10. #define Value(...) Values(make_tuple(__VA_ARGS__))
  11. /*
  12. * Detector's rotation invariance check
  13. */
  14. INSTANTIATE_TEST_CASE_P(SIFT, DetectorRotationInvariance,
  15. Value(IMAGE_TSUKUBA, SIFT::create(), 0.45f, 0.70f));
  16. INSTANTIATE_TEST_CASE_P(BRISK, DetectorRotationInvariance,
  17. Value(IMAGE_TSUKUBA, BRISK::create(), 0.45f, 0.76f));
  18. INSTANTIATE_TEST_CASE_P(ORB, DetectorRotationInvariance,
  19. Value(IMAGE_TSUKUBA, ORB::create(), 0.5f, 0.76f));
  20. INSTANTIATE_TEST_CASE_P(AKAZE, DetectorRotationInvariance,
  21. Value(IMAGE_TSUKUBA, AKAZE::create(), 0.5f, 0.71f));
  22. INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DetectorRotationInvariance,
  23. Value(IMAGE_TSUKUBA, AKAZE::create(AKAZE::DESCRIPTOR_KAZE), 0.5f, 0.71f));
  24. /*
  25. * Detector's scale invariance check
  26. */
  27. INSTANTIATE_TEST_CASE_P(SIFT, DetectorScaleInvariance,
  28. Value(IMAGE_BIKES, SIFT::create(0, 3, 0.09), 0.65f, 0.98f));
  29. INSTANTIATE_TEST_CASE_P(BRISK, DetectorScaleInvariance,
  30. Value(IMAGE_BIKES, BRISK::create(), 0.08f, 0.49f));
  31. INSTANTIATE_TEST_CASE_P(ORB, DetectorScaleInvariance,
  32. Value(IMAGE_BIKES, ORB::create(), 0.08f, 0.49f));
  33. INSTANTIATE_TEST_CASE_P(KAZE, DetectorScaleInvariance,
  34. Value(IMAGE_BIKES, KAZE::create(), 0.08f, 0.49f));
  35. INSTANTIATE_TEST_CASE_P(AKAZE, DetectorScaleInvariance,
  36. Value(IMAGE_BIKES, AKAZE::create(), 0.08f, 0.49f));
  37. INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DetectorScaleInvariance,
  38. Value(IMAGE_BIKES, AKAZE::create(AKAZE::DESCRIPTOR_KAZE), 0.08f, 0.49f));
  39. }} // namespace