set epsilon for gpu OpticalFlowBM to 1e-6, since it uses floating point arithmetic
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Wed, 25 Feb 2015 10:16:36 +0000 (13:16 +0300)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Wed, 25 Feb 2015 10:16:36 +0000 (13:16 +0300)
modules/gpu/test/test_optflow.cpp

index 571403d..343a756 100644 (file)
@@ -501,8 +501,8 @@ GPU_TEST_P(OpticalFlowBM, Accuracy)
     cv::Mat velx, vely;
     calcOpticalFlowBM(frame0, frame1, block_size, shift_size, max_range, false, velx, vely);
 
-    EXPECT_MAT_NEAR(velx, d_velx, 0);
-    EXPECT_MAT_NEAR(vely, d_vely, 0);
+    EXPECT_MAT_NEAR(velx, d_velx, 1e-6);
+    EXPECT_MAT_NEAR(vely, d_vely, 1e-6);
 }
 
 INSTANTIATE_TEST_CASE_P(GPU_Video, OpticalFlowBM, ALL_DEVICES);