From: Andrey Pavlenko Date: Tue, 13 Sep 2011 11:19:40 +0000 (+0000) Subject: Perf Tests: default stitching scenario. X-Git-Tag: accepted/2.0/20130307.220821~1867 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94b3bb154e639c8cc06ba1f1ad95d3e3294fda1c;p=profile%2Fivi%2Fopencv.git Perf Tests: default stitching scenario. --- diff --git a/modules/stitching/perf/perf_main.cpp b/modules/stitching/perf/perf_main.cpp new file mode 100644 index 0000000..0797856 --- /dev/null +++ b/modules/stitching/perf/perf_main.cpp @@ -0,0 +1,3 @@ +#include "perf_precomp.hpp" + +CV_PERF_TEST_MAIN(stitching) diff --git a/modules/stitching/perf/perf_precomp.cpp b/modules/stitching/perf/perf_precomp.cpp new file mode 100644 index 0000000..8552ac3 --- /dev/null +++ b/modules/stitching/perf/perf_precomp.cpp @@ -0,0 +1 @@ +#include "perf_precomp.hpp" diff --git a/modules/stitching/perf/perf_precomp.hpp b/modules/stitching/perf/perf_precomp.hpp new file mode 100644 index 0000000..3c2e8cf --- /dev/null +++ b/modules/stitching/perf/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 diff --git a/modules/stitching/perf/perf_stich.cpp b/modules/stitching/perf/perf_stich.cpp new file mode 100644 index 0000000..085d397 --- /dev/null +++ b/modules/stitching/perf/perf_stich.cpp @@ -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 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 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); } +}