Normalize line endings and whitespace
This commit is contained in:
committed by
Andrey Kamaev
parent
0442bca235
commit
81f826db2b
@@ -6,11 +6,11 @@ using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define TYPICAL_MAT_SIZES_ABS TYPICAL_MAT_SIZES
|
||||
#define TYPICAL_MAT_SIZES_ABS TYPICAL_MAT_SIZES
|
||||
#define TYPICAL_MAT_TYPES_ABS CV_8SC1, CV_8SC4, CV_32SC1, CV_32FC1
|
||||
#define TYPICAL_MATS_ABS testing::Combine( testing::Values( TYPICAL_MAT_SIZES_ABS), testing::Values( TYPICAL_MAT_TYPES_ABS) )
|
||||
|
||||
PERF_TEST_P(Size_MatType, abs, TYPICAL_MATS_ABS)
|
||||
PERF_TEST_P(Size_MatType, abs, TYPICAL_MATS_ABS)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define TYPICAL_MAT_TYPES_ADWEIGHTED CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32SC4
|
||||
#define TYPICAL_MATS_ADWEIGHTED testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_ADWEIGHTED))
|
||||
|
||||
PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
||||
{
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
Mat src1(size, type);
|
||||
Mat src2(size, type);
|
||||
double alpha = 3.75;
|
||||
double beta = -0.125;
|
||||
double gamma = 100.0;
|
||||
|
||||
Mat dst(size, type);
|
||||
|
||||
declare.in(src1, src2, dst, WARMUP_RNG).out(dst);
|
||||
|
||||
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
|
||||
|
||||
SANITY_CHECK(dst);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define TYPICAL_MAT_TYPES_ADWEIGHTED CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32SC4
|
||||
#define TYPICAL_MATS_ADWEIGHTED testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_ADWEIGHTED))
|
||||
|
||||
PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
||||
{
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
Mat src1(size, type);
|
||||
Mat src2(size, type);
|
||||
double alpha = 3.75;
|
||||
double beta = -0.125;
|
||||
double gamma = 100.0;
|
||||
|
||||
Mat dst(size, type);
|
||||
|
||||
declare.in(src1, src2, dst, WARMUP_RNG).out(dst);
|
||||
|
||||
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
|
||||
|
||||
SANITY_CHECK(dst);
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, MatType, int, double> Size_DepthSrc_DepthDst_Channels_alpha_t;
|
||||
typedef perf::TestBaseWithParam<Size_DepthSrc_DepthDst_Channels_alpha_t> Size_DepthSrc_DepthDst_Channels_alpha;
|
||||
|
||||
PERF_TEST_P( Size_DepthSrc_DepthDst_Channels_alpha, convertTo,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(szVGA, sz1080p),
|
||||
testing::Values(CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(1, 4),
|
||||
testing::Values(1.0, 1./255)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int depthSrc = get<1>(GetParam());
|
||||
int depthDst = get<2>(GetParam());
|
||||
int channels = get<3>(GetParam());
|
||||
double alpha = get<4>(GetParam());
|
||||
|
||||
Mat src(sz, CV_MAKETYPE(depthSrc, channels));
|
||||
randu(src, 0, 255);
|
||||
Mat dst(sz, CV_MAKETYPE(depthDst, channels));
|
||||
|
||||
TEST_CYCLE() src.convertTo(dst, depthDst, alpha);
|
||||
|
||||
SANITY_CHECK(dst, alpha == 1.0 ? 1e-12 : 1e-7);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, MatType, int, double> Size_DepthSrc_DepthDst_Channels_alpha_t;
|
||||
typedef perf::TestBaseWithParam<Size_DepthSrc_DepthDst_Channels_alpha_t> Size_DepthSrc_DepthDst_Channels_alpha;
|
||||
|
||||
PERF_TEST_P( Size_DepthSrc_DepthDst_Channels_alpha, convertTo,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(szVGA, sz1080p),
|
||||
testing::Values(CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(1, 4),
|
||||
testing::Values(1.0, 1./255)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int depthSrc = get<1>(GetParam());
|
||||
int depthDst = get<2>(GetParam());
|
||||
int channels = get<3>(GetParam());
|
||||
double alpha = get<4>(GetParam());
|
||||
|
||||
Mat src(sz, CV_MAKETYPE(depthSrc, channels));
|
||||
randu(src, 0, 255);
|
||||
Mat dst(sz, CV_MAKETYPE(depthDst, channels));
|
||||
|
||||
TEST_CYCLE() src.convertTo(dst, depthDst, alpha);
|
||||
|
||||
SANITY_CHECK(dst, alpha == 1.0 ? 1e-12 : 1e-7);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define MAT_TYPES_DFT CV_32FC1, CV_64FC1
|
||||
#define MAT_SIZES_DFT sz1080p, sz2K
|
||||
#define TEST_MATS_DFT testing::Combine(testing::Values(MAT_SIZES_DFT), testing::Values(MAT_TYPES_DFT))
|
||||
|
||||
PERF_TEST_P(Size_MatType, dft, TEST_MATS_DFT)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
|
||||
Mat src(sz, type);
|
||||
Mat dst(sz, type);
|
||||
|
||||
declare.in(src, WARMUP_RNG).time(60);
|
||||
|
||||
TEST_CYCLE() dft(src, dst);
|
||||
|
||||
SANITY_CHECK(dst, 1e-5);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define MAT_TYPES_DFT CV_32FC1, CV_64FC1
|
||||
#define MAT_SIZES_DFT sz1080p, sz2K
|
||||
#define TEST_MATS_DFT testing::Combine(testing::Values(MAT_SIZES_DFT), testing::Values(MAT_TYPES_DFT))
|
||||
|
||||
PERF_TEST_P(Size_MatType, dft, TEST_MATS_DFT)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
|
||||
Mat src(sz, type);
|
||||
Mat dst(sz, type);
|
||||
|
||||
declare.in(src, WARMUP_RNG).time(60);
|
||||
|
||||
TEST_CYCLE() dft(src, dst);
|
||||
|
||||
SANITY_CHECK(dst, 1e-5);
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef tr1::tuple<MatType, int> MatType_Length_t;
|
||||
typedef TestBaseWithParam<MatType_Length_t> MatType_Length;
|
||||
|
||||
PERF_TEST_P( MatType_Length, dot,
|
||||
testing::Combine(
|
||||
testing::Values( CV_8UC1, CV_32SC1, CV_32FC1 ),
|
||||
testing::Values( 32, 64, 128, 256, 512, 1024 )
|
||||
))
|
||||
{
|
||||
int type = get<0>(GetParam());
|
||||
int size = get<1>(GetParam());
|
||||
Mat a(size, size, type);
|
||||
Mat b(size, size, type);
|
||||
|
||||
declare.in(a, b, WARMUP_RNG);
|
||||
|
||||
double product;
|
||||
|
||||
TEST_CYCLE_N(1000) product = a.dot(b);
|
||||
|
||||
SANITY_CHECK(product, 1e-6, ERROR_RELATIVE);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef tr1::tuple<MatType, int> MatType_Length_t;
|
||||
typedef TestBaseWithParam<MatType_Length_t> MatType_Length;
|
||||
|
||||
PERF_TEST_P( MatType_Length, dot,
|
||||
testing::Combine(
|
||||
testing::Values( CV_8UC1, CV_32SC1, CV_32FC1 ),
|
||||
testing::Values( 32, 64, 128, 256, 512, 1024 )
|
||||
))
|
||||
{
|
||||
int type = get<0>(GetParam());
|
||||
int size = get<1>(GetParam());
|
||||
Mat a(size, size, type);
|
||||
Mat b(size, size, type);
|
||||
|
||||
declare.in(a, b, WARMUP_RNG);
|
||||
|
||||
double product;
|
||||
|
||||
TEST_CYCLE_N(1000) product = a.dot(b);
|
||||
|
||||
SANITY_CHECK(product, 1e-6, ERROR_RELATIVE);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define TYPICAL_MAT_TYPES_INRANGE CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_32FC4
|
||||
#define TYPICAL_MATS_INRANGE testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_INRANGE))
|
||||
|
||||
PERF_TEST_P(Size_MatType, inRange, TYPICAL_MATS_INRANGE)
|
||||
{
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
Mat src1(size, type);
|
||||
Mat src2(size, type);
|
||||
Mat src3(size, type);
|
||||
Mat dst(size, type);
|
||||
|
||||
declare.in(src1, src2, src3, WARMUP_RNG).out(dst);
|
||||
|
||||
TEST_CYCLE() inRange( src1, src2, src3, dst );
|
||||
|
||||
SANITY_CHECK(dst);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define TYPICAL_MAT_TYPES_INRANGE CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_32FC4
|
||||
#define TYPICAL_MATS_INRANGE testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_INRANGE))
|
||||
|
||||
PERF_TEST_P(Size_MatType, inRange, TYPICAL_MATS_INRANGE)
|
||||
{
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
Mat src1(size, type);
|
||||
Mat src2(size, type);
|
||||
Mat src3(size, type);
|
||||
Mat dst(size, type);
|
||||
|
||||
declare.in(src1, src2, src3, WARMUP_RNG).out(dst);
|
||||
|
||||
TEST_CYCLE() inRange( src1, src2, src3, dst );
|
||||
|
||||
SANITY_CHECK(dst);
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, int> Size_SrcDepth_DstChannels_t;
|
||||
typedef perf::TestBaseWithParam<Size_SrcDepth_DstChannels_t> Size_SrcDepth_DstChannels;
|
||||
|
||||
PERF_TEST_P( Size_SrcDepth_DstChannels, merge,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
testing::Values(CV_8U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(2, 3, 4)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int srcDepth = get<1>(GetParam());
|
||||
int dstChannels = get<2>(GetParam());
|
||||
|
||||
vector<Mat> mv;
|
||||
for( int i = 0; i < dstChannels; ++i )
|
||||
{
|
||||
mv.push_back( Mat(sz, CV_MAKETYPE(srcDepth, 1)) );
|
||||
randu(mv[i], 0, 255);
|
||||
}
|
||||
|
||||
Mat dst;
|
||||
TEST_CYCLE() merge( (vector<Mat> &)mv, dst );
|
||||
|
||||
SANITY_CHECK(dst, 1e-12);
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, int> Size_SrcDepth_DstChannels_t;
|
||||
typedef perf::TestBaseWithParam<Size_SrcDepth_DstChannels_t> Size_SrcDepth_DstChannels;
|
||||
|
||||
PERF_TEST_P( Size_SrcDepth_DstChannels, merge,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
testing::Values(CV_8U, CV_16S, CV_32S, CV_32F, CV_64F),
|
||||
testing::Values(2, 3, 4)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int srcDepth = get<1>(GetParam());
|
||||
int dstChannels = get<2>(GetParam());
|
||||
|
||||
vector<Mat> mv;
|
||||
for( int i = 0; i < dstChannels; ++i )
|
||||
{
|
||||
mv.push_back( Mat(sz, CV_MAKETYPE(srcDepth, 1)) );
|
||||
randu(mv[i], 0, 255);
|
||||
}
|
||||
|
||||
Mat dst;
|
||||
TEST_CYCLE() merge( (vector<Mat> &)mv, dst );
|
||||
|
||||
SANITY_CHECK(dst, 1e-12);
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, int> Size_Depth_Channels_t;
|
||||
typedef perf::TestBaseWithParam<Size_Depth_Channels_t> Size_Depth_Channels;
|
||||
|
||||
PERF_TEST_P( Size_Depth_Channels, split,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
testing::Values(CV_8U, CV_16S, CV_32F, CV_64F),
|
||||
testing::Values(2, 3, 4)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int depth = get<1>(GetParam());
|
||||
int channels = get<2>(GetParam());
|
||||
|
||||
Mat m(sz, CV_MAKETYPE(depth, channels));
|
||||
randu(m, 0, 255);
|
||||
|
||||
vector<Mat> mv;
|
||||
|
||||
TEST_CYCLE() split(m, (vector<Mat>&)mv);
|
||||
|
||||
SANITY_CHECK(mv, 1e-12);
|
||||
}
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
typedef std::tr1::tuple<Size, MatType, int> Size_Depth_Channels_t;
|
||||
typedef perf::TestBaseWithParam<Size_Depth_Channels_t> Size_Depth_Channels;
|
||||
|
||||
PERF_TEST_P( Size_Depth_Channels, split,
|
||||
testing::Combine
|
||||
(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
testing::Values(CV_8U, CV_16S, CV_32F, CV_64F),
|
||||
testing::Values(2, 3, 4)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int depth = get<1>(GetParam());
|
||||
int channels = get<2>(GetParam());
|
||||
|
||||
Mat m(sz, CV_MAKETYPE(depth, channels));
|
||||
randu(m, 0, 255);
|
||||
|
||||
vector<Mat> mv;
|
||||
|
||||
TEST_CYCLE() split(m, (vector<Mat>&)mv);
|
||||
|
||||
SANITY_CHECK(mv, 1e-12);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user