Perf Tests: default stitching scenario.

pull/13383/head
Andrey Pavlenko 14 years ago
parent 069c43835b
commit 94b3bb154e
  1. 3
      modules/stitching/perf/perf_main.cpp
  2. 1
      modules/stitching/perf/perf_precomp.cpp
  3. 12
      modules/stitching/perf/perf_precomp.hpp
  4. 44
      modules/stitching/perf/perf_stich.cpp

@ -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…
Cancel
Save