mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
gapi(test): more reliable checks
avoid `countNonZero()`, use `norm()`
This commit is contained in:
@@ -15,35 +15,35 @@ namespace opencv_test
|
||||
{
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(RGB2GrayTestFluid, RGB2GrayTest,
|
||||
Combine(Values(ToleranceRGBBGR(0.001).to_compare_f()),
|
||||
Combine(Values(ToleranceColor(1e-3).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(BGR2GrayTestFluid, BGR2GrayTest,
|
||||
Combine(Values(ToleranceRGBBGR(0.001).to_compare_f()),
|
||||
Combine(Values(ToleranceColor(1e-3).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(RGB2YUVTestFluid, RGB2YUVTest,
|
||||
Combine(Values(ToleranceRGBBGR(0.15*3).to_compare_f()),
|
||||
Combine(Values(ToleranceColor(1e-3).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(YUV2RGBTestFluid, YUV2RGBTest,
|
||||
Combine(Values(ToleranceTriple(0.25 * 3, 0.01 * 3, 1e-5 * 3).to_compare_f()),
|
||||
Combine(Values(ToleranceColor(1e-3).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(RGB2LabTestFluid, RGB2LabTest,
|
||||
Combine(Values(ToleranceTriple(0.25 * 3, 0.0, 1e-5 * 3).to_compare_f()),
|
||||
Combine(Values(AbsSimilarPoints(1, 0.05).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
@@ -51,14 +51,14 @@ INSTANTIATE_TEST_CASE_P(RGB2LabTestFluid, RGB2LabTest,
|
||||
|
||||
// FIXME: Not supported by Fluid yet (no kernel implemented)
|
||||
INSTANTIATE_TEST_CASE_P(BGR2LUVTestFluid, BGR2LUVTest,
|
||||
Combine(Values(ToleranceTriple(0.25 * 3, 0.01 * 3, 0.0001 * 3).to_compare_f()),
|
||||
Combine(Values(ToleranceColor(5e-3, 6).to_compare_f()),
|
||||
Values(cv::Size(1280, 720),
|
||||
cv::Size(640, 480)),
|
||||
Values(true, false),
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(blurTestFluid, BlurTest,
|
||||
Combine(Values(AbsTolerance(0.0).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-4f, 0.01).to_compare_f()),
|
||||
Values(CV_8UC1, CV_16UC1, CV_16SC1),
|
||||
Values(3), // add kernel size=5 when implementation is ready
|
||||
Values(cv::Size(1280, 720),
|
||||
@@ -68,7 +68,7 @@ INSTANTIATE_TEST_CASE_P(blurTestFluid, BlurTest,
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(gaussBlurTestFluid, GaussianBlurTest,
|
||||
Combine(Values(AbsToleranceGaussianBlur_Float_Int(1e-6, 1e-6).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-3f, 0.01).to_compare_f()),
|
||||
Values(CV_8UC1, CV_16UC1, CV_16SC1),
|
||||
Values(3), // add kernel size=5 when implementation is ready
|
||||
Values(cv::Size(1280, 720),
|
||||
@@ -122,7 +122,7 @@ INSTANTIATE_TEST_CASE_P(SobelTestFluid, SobelTest,
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(SobelTestFluid32F, SobelTest,
|
||||
Combine(Values(AbsToleranceSobel(1e-3).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-4f, 0.01).to_compare_f()),
|
||||
Values(CV_32FC1),
|
||||
Values(3), // add kernel size=5 when implementation is ready
|
||||
Values(cv::Size(1280, 720),
|
||||
@@ -134,7 +134,7 @@ INSTANTIATE_TEST_CASE_P(SobelTestFluid32F, SobelTest,
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(boxFilterTestFluid32, BoxFilterTest,
|
||||
Combine(Values(AbsTolerance_Float_Int(1e-6, 1e-4).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-4f, 0.01).to_compare_f()),
|
||||
Values(CV_8UC1, CV_16UC1, CV_16SC1),
|
||||
Values(3), // add kernel size=5 when implementation is ready
|
||||
Values(cv::Size(1280, 720),
|
||||
@@ -145,7 +145,7 @@ INSTANTIATE_TEST_CASE_P(boxFilterTestFluid32, BoxFilterTest,
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(sepFilterTestFluid, SepFilterTest,
|
||||
Combine(Values(AbsToleranceSepFilter(1e-5f).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-4f, 0.01).to_compare_f()),
|
||||
Values(CV_32FC1),
|
||||
Values(3), // add kernel size=5 when implementation is ready
|
||||
Values(cv::Size(1280, 720),
|
||||
@@ -155,7 +155,7 @@ INSTANTIATE_TEST_CASE_P(sepFilterTestFluid, SepFilterTest,
|
||||
Values(cv::compile_args(IMGPROC_FLUID))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(filter2DTestFluid, Filter2DTest,
|
||||
Combine(Values(AbsTolerance_Float_Int(1e-6, 1e-4).to_compare_f()),
|
||||
Combine(Values(ToleranceFilter(1e-4f, 0.01).to_compare_f()),
|
||||
Values(CV_8UC1, CV_16UC1, CV_16SC1),
|
||||
Values(3), // add kernel size=4,5,7 when implementation ready
|
||||
Values(cv::Size(1280, 720),
|
||||
|
||||
Reference in New Issue
Block a user