enabling sanity checks for warp and resize functions on Android

- add syntetic images generation function to ts
- use generated syntetic images
This commit is contained in:
Andrey Pavlenko
2013-01-23 17:25:30 +04:00
parent 9c7a8dd584
commit 81721d0dce
4 changed files with 114 additions and 48 deletions

View File

@@ -21,16 +21,14 @@ PERF_TEST_P(MatInfo_Size_Size, resizeUpLinear,
Size from = get<1>(GetParam());
Size to = get<2>(GetParam());
cv::Mat src(from, matType);
cv::Mat dst(to, matType);
declare.in(src, WARMUP_RNG).out(dst);
cv::Mat src(from, matType), dst(to, matType);
cvtest::fillGradient(src);
declare.in(src).out(dst);
TEST_CYCLE() resize(src, dst, to);
// Test case temporary disabled for Android Platform
#ifdef ANDROID
SANITY_CHECK(dst, 255); // TODO: Reimplement check in future versions
SANITY_CHECK(dst, 5);
#else
SANITY_CHECK(dst, 1 + 1e-6);
#endif
@@ -50,16 +48,14 @@ PERF_TEST_P(MatInfo_Size_Size, resizeDownLinear,
Size from = get<1>(GetParam());
Size to = get<2>(GetParam());
cv::Mat src(from, matType);
cv::Mat dst(to, matType);
declare.in(src, WARMUP_RNG).out(dst);
cv::Mat src(from, matType), dst(to, matType);
cvtest::fillGradient(src);
declare.in(src).out(dst);
TEST_CYCLE() resize(src, dst, to);
// Test case temporary disabled for Android Platform
#ifdef ANDROID
SANITY_CHECK(dst, 255); // TODO: Reimplement check in future versions
SANITY_CHECK(dst, 5);
#else
SANITY_CHECK(dst, 1 + 1e-6);
#endif