Commit 94b3bb15 authored by Andrey Pavlenko's avatar Andrey Pavlenko

Perf Tests: default stitching scenario.

parent 069c4383
#include "perf_precomp.hpp"
CV_PERF_TEST_MAIN(stitching)
#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
#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); }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment