Commit e7e7e04d authored by Ilya Lavrenov's avatar Ilya Lavrenov

came back to relative error

parent c89dfd33
...@@ -93,15 +93,23 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType, ...@@ -93,15 +93,23 @@ PARAM_TEST_CASE(ImgprocTestBase, MatType,
generateOclMat(gdst_whole, gdst_roi, dst_whole, roiSize, dstBorder); generateOclMat(gdst_whole, gdst_roi, dst_whole, roiSize, dstBorder);
} }
void Near(double threshold = 0.0) void Near(double threshold = 0.0, bool relative = false)
{ {
Mat roi, whole; Mat roi, whole;
gdst_whole.download(whole); gdst_whole.download(whole);
gdst_roi.download(roi); gdst_roi.download(roi);
if (relative)
{
EXPECT_MAT_NEAR_RELATIVE(dst_whole, whole, threshold);
EXPECT_MAT_NEAR_RELATIVE(dst_roi, roi, threshold);
}
else
{
EXPECT_MAT_NEAR(dst_whole, whole, threshold); EXPECT_MAT_NEAR(dst_whole, whole, threshold);
EXPECT_MAT_NEAR(dst_roi, roi, threshold); EXPECT_MAT_NEAR(dst_roi, roi, threshold);
} }
}
}; };
////////////////////////////////copyMakeBorder//////////////////////////////////////////// ////////////////////////////////copyMakeBorder////////////////////////////////////////////
...@@ -236,7 +244,7 @@ OCL_TEST_P(CornerMinEigenVal, Mat) ...@@ -236,7 +244,7 @@ OCL_TEST_P(CornerMinEigenVal, Mat)
cornerMinEigenVal(src_roi, dst_roi, blockSize, apertureSize, borderType); cornerMinEigenVal(src_roi, dst_roi, blockSize, apertureSize, borderType);
ocl::cornerMinEigenVal(gsrc_roi, gdst_roi, blockSize, apertureSize, borderType); ocl::cornerMinEigenVal(gsrc_roi, gdst_roi, blockSize, apertureSize, borderType);
Near(1e-6); Near(1e-5, true);
} }
} }
...@@ -256,7 +264,7 @@ OCL_TEST_P(CornerHarris, Mat) ...@@ -256,7 +264,7 @@ OCL_TEST_P(CornerHarris, Mat)
cornerHarris(src_roi, dst_roi, blockSize, apertureSize, k, borderType); cornerHarris(src_roi, dst_roi, blockSize, apertureSize, k, borderType);
ocl::cornerHarris(gsrc_roi, gdst_roi, blockSize, apertureSize, k, borderType); ocl::cornerHarris(gsrc_roi, gdst_roi, blockSize, apertureSize, k, borderType);
Near(1e-6); Near(1e-5, true);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment