From 9aa3f754b74583abf2dd9c6492f3e38581742c66 Mon Sep 17 00:00:00 2001 From: Marina Kolpakova Date: Wed, 6 Jun 2012 15:29:24 +0000 Subject: [PATCH] fixed accuracy test --- modules/imgproc/src/imgwarp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index 910a63541e..be21ae9118 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -1276,14 +1276,14 @@ static void resizeArea_( const Mat& src, Mat& dst, const DecimateAlpha* xofs, in if(cur_dy >= dsize.height) return; for( dx = 0; dx < dsize.width; dx++ ) { - D[dx] = saturate_cast((sum[dx] + buf[dx]) / min(scale_y, src.cols - cur_dy * scale_y)); + D[dx] = saturate_cast((sum[dx] + buf[dx]) / min(scale_y, src.rows - cur_dy * scale_y)); sum[dx] = buf[dx] = 0; } } else for( dx = 0; dx < dsize.width; dx++ ) { - D[dx] = saturate_cast((sum[dx] + buf[dx]* beta1)/ min(scale_y, src.cols - cur_dy*scale_y)); + D[dx] = saturate_cast((sum[dx] + buf[dx]* beta1)/ min(scale_y, src.rows - cur_dy*scale_y)); sum[dx] = buf[dx]*beta; buf[dx] = 0; }