From 1ce5a724c73b26c4ec40f11c53eec22ac27b5031 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Thu, 24 Oct 2019 17:54:49 +0300 Subject: [PATCH] Fixed StereoBM uniqueness check --- modules/calib3d/src/stereobm.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index 028ba6cac8..a7c7bfd849 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -558,7 +558,10 @@ static void findStereoCorrespondenceBM_SIMD( const Mat& left, const Mat& right, { v_int32 sad4_l = vx_load_expand((short*)sad + d); if (v_check_any((thresh4 > sad4_l) & ((d1 > d4) | (d4 > d2)))) + { + dptr[y*dstep] = FILTERED; continue; + } d += v_int16::nlanes; } for( ; d < ndisp; d++ )