parent
dea8aae243
commit
a8b1abcb30
4 changed files with 58 additions and 7 deletions
@ -0,0 +1,29 @@ |
|||||||
|
#include "perf_precomp.hpp" |
||||||
|
|
||||||
|
using namespace std; |
||||||
|
using namespace cv; |
||||||
|
using namespace perf; |
||||||
|
|
||||||
|
typedef std::tr1::tuple<Size, float> Size_WBThresh_t; |
||||||
|
typedef perf::TestBaseWithParam<Size_WBThresh_t> Size_WBThresh; |
||||||
|
|
||||||
|
PERF_TEST_P( Size_WBThresh, autowbGrayworld, |
||||||
|
testing::Combine( |
||||||
|
testing::Values( TYPICAL_MAT_SIZES ), |
||||||
|
testing::Values( 0.1, 0.5, 1.0 ) |
||||||
|
) |
||||||
|
) |
||||||
|
{ |
||||||
|
Size size = std::tr1::get<0>(GetParam()); |
||||||
|
float wb_thresh = std::tr1::get<1>(GetParam()); |
||||||
|
|
||||||
|
Mat src(size, CV_8UC3); |
||||||
|
Mat dst(size, CV_8UC3); |
||||||
|
|
||||||
|
declare.in(src, WARMUP_RNG).out(dst); |
||||||
|
|
||||||
|
TEST_CYCLE() xphoto::autowbGrayworld(src, dst, wb_thresh); |
||||||
|
|
||||||
|
SANITY_CHECK(dst); |
||||||
|
} |
||||||
|
|
@ -0,0 +1,3 @@ |
|||||||
|
#include "perf_precomp.hpp" |
||||||
|
|
||||||
|
CV_PERF_TEST_MAIN(xphoto) |
@ -0,0 +1,19 @@ |
|||||||
|
#ifdef __GNUC__ |
||||||
|
# pragma GCC diagnostic ignored "-Wmissing-declarations" |
||||||
|
# if defined __clang__ || defined __APPLE__ |
||||||
|
# pragma GCC diagnostic ignored "-Wmissing-prototypes" |
||||||
|
# pragma GCC diagnostic ignored "-Wextra" |
||||||
|
# endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef __OPENCV_PERF_PRECOMP_HPP__ |
||||||
|
#define __OPENCV_PERF_PRECOMP_HPP__ |
||||||
|
|
||||||
|
#include "opencv2/ts.hpp" |
||||||
|
#include "opencv2/xphoto.hpp" |
||||||
|
|
||||||
|
#ifdef GTEST_CREATE_SHARED_LIBRARY |
||||||
|
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
Loading…
Reference in new issue