perf_daisy.cpp 969 B

123456789101112131415161718192021222324252627282930313233
  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> daisy;
  7. #define DAISY_IMAGES \
  8. "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
  9. "stitching/a3.png"
  10. PERF_TEST_P(daisy, extract, testing::Values(DAISY_IMAGES))
  11. {
  12. string filename = getDataPath(GetParam());
  13. Mat frame = imread(filename, IMREAD_GRAYSCALE);
  14. ASSERT_FALSE(frame.empty()) << "Unable to load source image " << filename;
  15. Mat mask;
  16. declare.in(frame).time(90);
  17. Ptr<DAISY> descriptor = DAISY::create();
  18. vector<KeyPoint> points;
  19. Mat_<float> descriptors;
  20. // compute all daisies in image
  21. TEST_CYCLE() descriptor->compute(frame, descriptors);
  22. SANITY_CHECK_NOTHING();
  23. }
  24. }} // namespace