mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge branch 4.x
This commit is contained in:
@@ -104,7 +104,7 @@ PERF_TEST_P(Size_MatType_BorderType, blur16x16,
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
BorderType btype = get<2>(GetParam());
|
||||
double eps = 1e-3;
|
||||
double eps = 1.25e-3;
|
||||
|
||||
eps = CV_MAT_DEPTH(type) <= CV_32S ? 1 : eps;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ static int extraOutputDepths[6][2] = {{CV_32S, CV_32S}, {CV_32S, CV_32F}, {CV_32
|
||||
typedef tuple<Size, MatType, MatDepth> Size_MatType_OutMatDepth_t;
|
||||
typedef perf::TestBaseWithParam<Size_MatType_OutMatDepth_t> Size_MatType_OutMatDepth;
|
||||
|
||||
typedef tuple<Size, MatType, IntegralOutputDepths> Size_MatType_OutMatDepthArray_t;
|
||||
typedef tuple<Size, std::tuple<MatType, IntegralOutputDepths>> Size_MatType_OutMatDepthArray_t;
|
||||
typedef perf::TestBaseWithParam<Size_MatType_OutMatDepthArray_t> Size_MatType_OutMatDepthArray;
|
||||
|
||||
PERF_TEST_P(Size_MatType_OutMatDepth, integral,
|
||||
@@ -83,19 +83,42 @@ PERF_TEST_P(Size_MatType_OutMatDepth, integral_sqsum,
|
||||
SANITY_CHECK(sqsum, 1e-6);
|
||||
}
|
||||
|
||||
static std::vector<std::tuple<MatType, IntegralOutputDepths>> GetFullSqsumDepthPairs() {
|
||||
static int extraDepths[12][2] = {
|
||||
{CV_8U, DEPTH_32S_64F},
|
||||
{CV_8U, DEPTH_32S_32F},
|
||||
{CV_8U, DEPTH_32S_32S},
|
||||
{CV_8U, DEPTH_32F_64F},
|
||||
{CV_8U, DEPTH_32F_32F},
|
||||
{CV_8U, DEPTH_64F_64F},
|
||||
{CV_16U, DEPTH_64F_64F},
|
||||
{CV_16S, DEPTH_64F_64F},
|
||||
{CV_32F, DEPTH_32F_64F},
|
||||
{CV_32F, DEPTH_32F_32F},
|
||||
{CV_32F, DEPTH_64F_64F},
|
||||
{CV_64F, DEPTH_64F_64F}
|
||||
};
|
||||
std::vector<std::tuple<MatType, IntegralOutputDepths>> valid_pairs;
|
||||
for (size_t i = 0; i < 12; i++) {
|
||||
for (int cn = 1; cn <= 4; cn++) {
|
||||
valid_pairs.emplace_back(CV_MAKETYPE(extraDepths[i][0], cn), extraDepths[i][1]);
|
||||
}
|
||||
}
|
||||
return valid_pairs;
|
||||
}
|
||||
|
||||
PERF_TEST_P(Size_MatType_OutMatDepthArray, DISABLED_integral_sqsum_full,
|
||||
testing::Combine(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
testing::Values(CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4),
|
||||
testing::Values(DEPTH_32S_32S, DEPTH_32S_32F, DEPTH_32S_64F, DEPTH_32F_32F, DEPTH_32F_64F, DEPTH_64F_64F)
|
||||
testing::ValuesIn(GetFullSqsumDepthPairs())
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<0>(GetParam());
|
||||
int matType = get<1>(GetParam());
|
||||
int *outputDepths = (int *)extraOutputDepths[get<2>(GetParam())];
|
||||
int sdepth = outputDepths[0];
|
||||
int sqdepth = outputDepths[1];
|
||||
auto depths = get<1>(GetParam());
|
||||
int matType = get<0>(depths);
|
||||
int sdepth = extraOutputDepths[get<1>(depths)][0];
|
||||
int sqdepth = extraOutputDepths[get<1>(depths)][1];
|
||||
|
||||
Mat src(sz, matType);
|
||||
Mat sum(sz, sdepth);
|
||||
|
||||
Reference in New Issue
Block a user