mirror of https://github.com/opencv/opencv.git
parent
069c43835b
commit
94b3bb154e
4 changed files with 60 additions and 0 deletions
@ -0,0 +1,3 @@ |
||||
#include "perf_precomp.hpp" |
||||
|
||||
CV_PERF_TEST_MAIN(stitching) |
@ -0,0 +1 @@ |
||||
#include "perf_precomp.hpp" |
@ -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 |
@ -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