mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 04:25:42 +08:00
moved DIS optical flow from opencv_contrib to opencv, moved TVL1 from opencv to opencv_contrib
This commit is contained in:
31
modules/optflow/perf/perf_tvl1optflow.cpp
Normal file
31
modules/optflow/perf/perf_tvl1optflow.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
namespace opencv_test { namespace {
|
||||
using namespace perf;
|
||||
|
||||
typedef TestBaseWithParam< std::pair<string, string> > ImagePair;
|
||||
|
||||
std::pair<string, string> impair(const char* im1, const char* im2)
|
||||
{
|
||||
return std::make_pair(string(im1), string(im2));
|
||||
}
|
||||
|
||||
PERF_TEST_P(ImagePair, OpticalFlowDual_TVL1, testing::Values(impair("cv/optflow/RubberWhale1.png", "cv/optflow/RubberWhale2.png")))
|
||||
{
|
||||
declare.time(260);
|
||||
|
||||
Mat frame1 = imread(getDataPath(GetParam().first), IMREAD_GRAYSCALE);
|
||||
Mat frame2 = imread(getDataPath(GetParam().second), IMREAD_GRAYSCALE);
|
||||
ASSERT_FALSE(frame1.empty());
|
||||
ASSERT_FALSE(frame2.empty());
|
||||
|
||||
Mat flow;
|
||||
|
||||
Ptr<DenseOpticalFlow> tvl1 = createOptFlow_DualTVL1();
|
||||
|
||||
TEST_CYCLE() tvl1->calc(frame1, frame2, flow);
|
||||
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
}} // namespace
|
Reference in New Issue
Block a user