mirror of
https://github.com/opencv/opencv.git
synced 2025-01-20 07:34:42 +08:00
Perf Tests: default stitching scenario.
This commit is contained in:
parent
069c43835b
commit
94b3bb154e
3
modules/stitching/perf/perf_main.cpp
Normal file
3
modules/stitching/perf/perf_main.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
CV_PERF_TEST_MAIN(stitching)
|
1
modules/stitching/perf/perf_precomp.cpp
Normal file
1
modules/stitching/perf/perf_precomp.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "perf_precomp.hpp"
|
12
modules/stitching/perf/perf_precomp.hpp
Normal file
12
modules/stitching/perf/perf_precomp.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef __OPENCV_PERF_PRECOMP_HPP__
|
||||
#define __OPENCV_PERF_PRECOMP_HPP__
|
||||
|
||||
#include "opencv2/ts/ts.hpp"
|
||||
|
||||
#include "opencv2/stitching/stitcher.hpp"
|
||||
|
||||
#if GTEST_CREATE_SHARED_LIBRARY
|
||||
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
|
||||
#endif
|
||||
|
||||
#endif
|
44
modules/stitching/perf/perf_stich.cpp
Normal file
44
modules/stitching/perf/perf_stich.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
|
||||
|
||||
/*
|
||||
// Stitcher::Status Stitcher::stitch(InputArray imgs, OutputArray pano)
|
||||
*/
|
||||
PERF_TEST( stitch3, a123 )
|
||||
{
|
||||
Mat pano;
|
||||
|
||||
vector<Mat> imgs;
|
||||
imgs.push_back( imread( getDataPath("stitching/a1.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a2.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a3.jpg") ) );
|
||||
|
||||
Stitcher stitcher = Stitcher::createDefault();
|
||||
Stitcher::Status status;
|
||||
|
||||
declare.time(30 * 20);
|
||||
|
||||
TEST_CYCLE(20) { status = stitcher.stitch(imgs, pano); }
|
||||
}
|
||||
|
||||
PERF_TEST( stitch2, b12 )
|
||||
{
|
||||
Mat pano;
|
||||
|
||||
vector<Mat> imgs;
|
||||
imgs.push_back( imread( getDataPath("stitching/b1.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/b2.jpg") ) );
|
||||
|
||||
Stitcher stitcher = Stitcher::createDefault();
|
||||
Stitcher::Status status;
|
||||
|
||||
declare.time(30 * 20);
|
||||
|
||||
TEST_CYCLE(20) { status = stitcher.stitch(imgs, pano); }
|
||||
}
|
Loading…
Reference in New Issue
Block a user