perf_deepflow.cpp 798 B

1234567891011121314151617181920212223242526272829303132
  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 tuple<Size> DFParams;
  7. typedef TestBaseWithParam<DFParams> DenseOpticalFlow_DeepFlow;
  8. PERF_TEST_P(DenseOpticalFlow_DeepFlow, perf, Values(szVGA, sz720p))
  9. {
  10. DFParams params = GetParam();
  11. Size sz = get<0>(params);
  12. Mat frame1(sz, CV_8U);
  13. Mat frame2(sz, CV_8U);
  14. Mat flow;
  15. randu(frame1, 0, 255);
  16. randu(frame2, 0, 255);
  17. TEST_CYCLE_N(1)
  18. {
  19. Ptr<DenseOpticalFlow> algo = createOptFlow_DeepFlow();
  20. algo->calc(frame1, frame2, flow);
  21. }
  22. SANITY_CHECK_NOTHING();
  23. }
  24. }} // namespace