Perf Tests: default stitching scenario.

This commit is contained in:
Andrey Pavlenko 2011-09-13 11:19:40 +00:00
parent 069c43835b
commit 94b3bb154e
4 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#include "perf_precomp.hpp"
CV_PERF_TEST_MAIN(stitching)

View File

@ -0,0 +1 @@
#include "perf_precomp.hpp"

View 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

View 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); }
}