From 786e3b9eee582c98fb4beba4b22e7a8951aa716f Mon Sep 17 00:00:00 2001 From: Ziyang LI Date: Mon, 10 Mar 2014 17:33:13 +0800 Subject: [PATCH 1/3] Moved x = 0 into the parenthesis Easier to understand --- modules/calib3d/src/stereobm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index f16bfe633c..8e9cc016be 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -119,9 +119,8 @@ static void prefilterNorm( const Mat& src, Mat& dst, int winsize, int ftzero, uc const uchar* curr = sptr + srcstep*y; const uchar* next = sptr + srcstep*MIN(y+1,size.height-1); uchar* dptr = dst.ptr(y); - x = 0; - - for( ; x < size.width; x++ ) + + for( x = 0; x < size.width; x++ ) vsum[x] = (ushort)(vsum[x] + bottom[x] - top[x]); for( x = 0; x <= wsz2; x++ ) From 4f5896493ea3e29b7938b70029c11e470a0ec1dc Mon Sep 17 00:00:00 2001 From: Ziyang LI Date: Wed, 12 Mar 2014 18:14:43 +0800 Subject: [PATCH 2/3] remove a whitepace --- modules/calib3d/src/stereobm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index 8e9cc016be..cd6302a8c3 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -122,7 +122,7 @@ static void prefilterNorm( const Mat& src, Mat& dst, int winsize, int ftzero, uc for( x = 0; x < size.width; x++ ) vsum[x] = (ushort)(vsum[x] + bottom[x] - top[x]); - + for( x = 0; x <= wsz2; x++ ) { vsum[-x-1] = vsum[0]; From bbe8654c3d9c0c01d8d6ecd836cc27b93aa65245 Mon Sep 17 00:00:00 2001 From: ziyangli Date: Wed, 12 Mar 2014 18:16:54 +0800 Subject: [PATCH 3/3] cleanup --- modules/calib3d/src/stereobm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index cd6302a8c3..b9328e876a 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -119,10 +119,10 @@ static void prefilterNorm( const Mat& src, Mat& dst, int winsize, int ftzero, uc const uchar* curr = sptr + srcstep*y; const uchar* next = sptr + srcstep*MIN(y+1,size.height-1); uchar* dptr = dst.ptr(y); - + for( x = 0; x < size.width; x++ ) vsum[x] = (ushort)(vsum[x] + bottom[x] - top[x]); - + for( x = 0; x <= wsz2; x++ ) { vsum[-x-1] = vsum[0];