diff --git a/modules/photo/test/ocl/test_denoising.cpp b/modules/photo/test/ocl/test_denoising.cpp index 4aba4b51e7..3b6998f063 100644 --- a/modules/photo/test/ocl/test_denoising.cpp +++ b/modules/photo/test/ocl/test_denoising.cpp @@ -16,7 +16,7 @@ namespace ocl { PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool) { int cn, templateWindowSize, searchWindowSize; - float h; + float h[4]; bool use_roi, use_image; TEST_DECLARE_INPUT_PARAMETER(src); @@ -30,7 +30,10 @@ PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool) templateWindowSize = 7; searchWindowSize = 21; - h = 3.0f; + + ASSERT_TRUE(cn > 0 && cn <= 4); + for (int i=0; i