mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Merge pull request #2878 from vbystricky:ocl_integral_sqsum_perf_test
This commit is contained in:
commit
01a98fae93
@ -234,6 +234,23 @@ OCL_PERF_TEST_P(IntegralFixture, Integral1, ::testing::Combine(OCL_TEST_SIZES, O
|
||||
SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
|
||||
}
|
||||
|
||||
OCL_PERF_TEST_P(IntegralFixture, Integral2, ::testing::Combine(OCL_TEST_SIZES, OCL_PERF_ENUM(CV_32S, CV_32F)))
|
||||
{
|
||||
const IntegralParams params = GetParam();
|
||||
const Size srcSize = get<0>(params);
|
||||
const int ddepth = get<1>(params);
|
||||
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, ddepth);
|
||||
|
||||
UMat src(srcSize, CV_8UC1), sum(srcSize + Size(1, 1), ddepth), sqsum(srcSize + Size(1, 1), CV_32F);
|
||||
declare.in(src, WARMUP_RNG).out(sum).out(sqsum);
|
||||
|
||||
OCL_TEST_CYCLE() cv::integral(src, sum, sqsum, ddepth, CV_32F);
|
||||
|
||||
SANITY_CHECK(sum, 1e-6, ERROR_RELATIVE);
|
||||
SANITY_CHECK(sqsum, 5e-5, ERROR_RELATIVE);
|
||||
}
|
||||
|
||||
///////////// Threshold ////////////////////////
|
||||
|
||||
CV_ENUM(ThreshType, THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, THRESH_TOZERO_INV)
|
||||
|
Loading…
Reference in New Issue
Block a user