1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #11315 from tomoaki0705:featureComparePixelCount

This commit is contained in:
Alexander Alekhin
2018-04-20 14:50:40 +00:00
3 changed files with 27 additions and 17 deletions
+6 -14
View File
@@ -304,14 +304,9 @@ PARAM_TEST_CASE(Resize, MatType, double, double, Interpolation, bool, int)
UMAT_UPLOAD_INPUT_PARAMETER(src);
UMAT_UPLOAD_OUTPUT_PARAMETER(dst);
}
void Near(double threshold = 0.0)
{
OCL_EXPECT_MATS_NEAR(dst, threshold);
}
};
#if defined(__aarch64__)
#if defined(__aarch64__) || defined(__arm__)
const int integerEps = 3;
#else
const int integerEps = 1;
@@ -328,7 +323,7 @@ OCL_TEST_P(Resize, Mat)
OCL_OFF(cv::resize(src_roi, dst_roi, Size(), fx, fy, interpolation));
OCL_ON(cv::resize(usrc_roi, udst_roi, Size(), fx, fy, interpolation));
Near(eps);
OCL_EXPECT_MAT_N_DIFF(dst, eps);
}
}
@@ -388,11 +383,6 @@ PARAM_TEST_CASE(Remap, MatDepth, Channels, std::pair<MatType, MatType>, BorderTy
if (noType != map2Type)
UMAT_UPLOAD_INPUT_PARAMETER(map2);
}
void Near(double threshold = 0.0)
{
OCL_EXPECT_MATS_NEAR(dst, threshold);
}
};
typedef Remap Remap_INTER_NEAREST;
@@ -406,7 +396,7 @@ OCL_TEST_P(Remap_INTER_NEAREST, Mat)
OCL_OFF(cv::remap(src_roi, dst_roi, map1_roi, map2_roi, INTER_NEAREST, borderType, val));
OCL_ON(cv::remap(usrc_roi, udst_roi, umap1_roi, umap2_roi, INTER_NEAREST, borderType, val));
Near(1.0);
OCL_EXPECT_MAT_N_DIFF(dst, 1.0);
}
}
@@ -423,12 +413,14 @@ OCL_TEST_P(Remap_INTER_LINEAR, Mat)
// TODO investigate accuracy
if (cv::ocl::Device::getDefault().isNVidia())
eps = 8.0;
#elif defined(__arm__)
eps = 8.0;
#endif
OCL_OFF(cv::remap(src_roi, dst_roi, map1_roi, map2_roi, INTER_LINEAR, borderType, val));
OCL_ON(cv::remap(usrc_roi, udst_roi, umap1_roi, umap2_roi, INTER_LINEAR, borderType, val));
Near(eps);
OCL_EXPECT_MAT_N_DIFF(dst, eps);
}
}