From ce35a6d8bee7883a9ac499e6c3d426acaa406595 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 22 Sep 2011 06:43:52 +0000 Subject: [PATCH] fixed bug in cv::reduce in reduceC_ for multi-channels source --- modules/core/src/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index 95b0c4e36f..25da75326f 100644 --- a/modules/core/src/matrix.cpp +++ b/modules/core/src/matrix.cpp @@ -1845,7 +1845,7 @@ reduceC_( const Mat& srcmat, Mat& dstmat ) for( ; i < size.width; i += cn ) { - a0 = op(a0, (WT)src[i]); + a0 = op(a0, (WT)src[i+k]); } a0 = op(a0, a1); dst[k] = (ST)a0;