perf_beblid.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 "perf_precomp.hpp"
  5. namespace opencv_test { namespace {
  6. typedef perf::TestBaseWithParam<std::string> beblid;
  7. #define BEBLID_IMAGES \
  8. "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
  9. "stitching/a3.png"
  10. #ifdef OPENCV_ENABLE_NONFREE
  11. PERF_TEST_P(beblid, extract, testing::Values(BEBLID_IMAGES))
  12. {
  13. string filename = getDataPath(GetParam());
  14. Mat frame = imread(filename, IMREAD_GRAYSCALE);
  15. ASSERT_FALSE(frame.empty()) << "Unable to load source image " << filename;
  16. Mat mask;
  17. declare.in(frame).time(90);
  18. Ptr<SURF> detector = SURF::create();
  19. vector<KeyPoint> points;
  20. detector->detect(frame, points, mask);
  21. Ptr<BEBLID> descriptor = BEBLID::create(6.25f);
  22. cv::Mat descriptors;
  23. TEST_CYCLE() descriptor->compute(frame, points, descriptors);
  24. SANITY_CHECK_NOTHING();
  25. }
  26. #endif // NONFREE
  27. }} // namespace