1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

fixed tests for ocl_filter2d, ocl_matchTemplate, ocl_histogram.cpp

This commit is contained in:
Elena Gvozdeva
2014-08-06 16:14:48 +04:00
parent d30729a816
commit c9b5d8cf4c
3 changed files with 16 additions and 5 deletions
+6 -2
View File
@@ -99,6 +99,10 @@ PARAM_TEST_CASE(CalcBackProject, MatDepth, int, bool)
Size roiSize = randomSize(1, MAX_VALUE);
int totalChannels = 0;
ranges.clear();
channels.clear();
for (int i = 0; i < N; ++i)
{
Border srcBorder = randomBorder(0, useRoi ? MAX_VALUE : 0);
@@ -202,9 +206,9 @@ OCL_TEST_P(CalcBackProject, Mat)
OCL_ON(cv::calcBackProject(uimages_roi, channels, uhist_roi, udst_roi, ranges, scale));
Size dstSize = dst_roi.size();
int nDiffs = (int)(0.03f*dstSize.height*dstSize.width);
int nDiffs = (int)(0.06f*dstSize.area()+1);
//check if the dst mats are the same except 3% difference
//check if the dst mats are the same except 6% difference
EXPECT_MAT_N_DIFF(dst_roi, udst_roi, nDiffs);
}
}