void Near(double threshold, bool relative) { if (relative) OCL_EXPECT_MATS_NEAR_RELATIVE(dst, threshold); else OCL_EXPECT_MATS_NEAR(dst, threshold); }
void Near() { bool isNormed = method == TM_CCORR_NORMED || method == TM_SQDIFF_NORMED || method == TM_CCOEFF_NORMED; if (isNormed) OCL_EXPECT_MATS_NEAR(result, 3e-2); else OCL_EXPECT_MATS_NEAR_RELATIVE_SPARSE(result, 1.5e-2); }
OCL_TEST_P(FastNlMeansDenoising_hsep, Mat) { for (int j = 0; j < test_loop_times; j++) { generateTestData(); OCL_OFF(cv::fastNlMeansDenoising(src_roi, dst_roi, h, templateWindowSize, searchWindowSize, normType)); OCL_ON(cv::fastNlMeansDenoising(usrc_roi, udst_roi, h, templateWindowSize, searchWindowSize, normType)); OCL_EXPECT_MATS_NEAR(dst, 1); } }
void Near(double threshold = 0.0) { OCL_EXPECT_MATS_NEAR(dst, threshold); }
Size _wholeSize; Point ofs; images_roi[i].locateROI(_wholeSize, ofs); uimages_roi[i] = uimages[i](Rect(ofs.x, ofs.y, images_roi[i].cols, images_roi[i].rows)); } UMAT_UPLOAD_INPUT_PARAMETER(hist) UMAT_UPLOAD_OUTPUT_PARAMETER(dst) scale = randomDouble(0.1, 1); } void Near() { OCL_EXPECT_MATS_NEAR(dst, 0.0) } }; //////////////////////////////// CalcBackProject ////////////////////////////////////////////// OCL_TEST_P(CalcBackProject, Mat) { for (int j = 0; j < test_loop_times; j++) { random_roi(); OCL_OFF(cv::calcBackProject(images_roi, channels, hist_roi, dst_roi, ranges, scale)); OCL_ON(cv::calcBackProject(uimages_roi, channels, uhist_roi, udst_roi, ranges, scale)); Near();