Merge pull request #1779 from perping:integral_2.4

This commit is contained in:
Roman Donchenko
2013-11-13 15:53:42 +04:00
committed by OpenCV Buildbot
8 changed files with 201 additions and 110 deletions

View File

@@ -275,23 +275,33 @@ OCL_TEST_P(CornerHarris, Mat)
//////////////////////////////////integral/////////////////////////////////////////////////
typedef ImgprocTestBase Integral;
struct Integral :
public ImgprocTestBase
{
int sdepth;
virtual void SetUp()
{
type = GET_PARAM(0);
blockSize = GET_PARAM(1);
sdepth = GET_PARAM(2);
useRoi = GET_PARAM(3);
}
};
OCL_TEST_P(Integral, Mat1)
{
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
ocl::integral(gsrc_roi, gdst_roi);
integral(src_roi, dst_roi);
ocl::integral(gsrc_roi, gdst_roi, sdepth);
integral(src_roi, dst_roi, sdepth);
Near();
}
}
// TODO wrong output type
OCL_TEST_P(Integral, DISABLED_Mat2)
OCL_TEST_P(Integral, Mat2)
{
Mat dst1;
ocl::oclMat gdst1;
@@ -300,10 +310,12 @@ OCL_TEST_P(Integral, DISABLED_Mat2)
{
random_roi();
integral(src_roi, dst1, dst_roi);
ocl::integral(gsrc_roi, gdst1, gdst_roi);
integral(src_roi, dst_roi, dst1, sdepth);
ocl::integral(gsrc_roi, gdst_roi, gdst1, sdepth);
Near();
if(gdst1.clCxt->supportsFeature(ocl::FEATURE_CL_DOUBLE))
EXPECT_MAT_NEAR(dst1, Mat(gdst1), 0.);
}
}
@@ -543,7 +555,7 @@ INSTANTIATE_TEST_CASE_P(Imgproc, CornerHarris, Combine(
INSTANTIATE_TEST_CASE_P(Imgproc, Integral, Combine(
Values((MatType)CV_8UC1), // TODO does not work with CV_32F, CV_64F
Values(0), // not used
Values(0), // not used
Values((MatType)CV_32SC1, (MatType)CV_32FC1),
Bool()));
INSTANTIATE_TEST_CASE_P(Imgproc, Threshold, Combine(