From c4d434fd6f42edd955429990354191200897204d Mon Sep 17 00:00:00 2001 From: Hamdi Sahloul <42140441+cv3d@users.noreply.github.com> Date: Tue, 9 Oct 2018 23:39:39 +0900 Subject: [PATCH] CUDA/BgSegm: fix the threshold of MOG2.Update test when detectShadow=true (#12762) --- modules/cudabgsegm/test/test_bgsegm.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/cudabgsegm/test/test_bgsegm.cpp b/modules/cudabgsegm/test/test_bgsegm.cpp index ce7c22808b..c0c319ff42 100644 --- a/modules/cudabgsegm/test/test_bgsegm.cpp +++ b/modules/cudabgsegm/test/test_bgsegm.cpp @@ -110,14 +110,7 @@ CUDA_TEST_P(MOG2, Update) mog2_gold->apply(frame, foreground_gold); - if (detectShadow) - { - ASSERT_MAT_SIMILAR(foreground_gold, foreground, 1e-2); - } - else - { - ASSERT_MAT_NEAR(foreground_gold, foreground, 0); - } + ASSERT_MAT_SIMILAR(foreground_gold, foreground, detectShadow ? 13e-3 : 18e-8); } }