From 69fbc6102c3872975e374c609f9276a19b7a1de4 Mon Sep 17 00:00:00 2001 From: Vsevolod Glumov Date: Thu, 11 Oct 2012 03:51:34 +0400 Subject: [PATCH] Fixed an issue with 'how_to_scan_images.cpp' tutorial code. Issue #2259 --- .../core/how_to_scan_images/how_to_scan_images.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp b/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp index b020c5ec13..700e27fc6c 100644 --- a/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp +++ b/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp @@ -129,8 +129,8 @@ Mat& ScanImageAndReduceC(Mat& I, const uchar* const table) int channels = I.channels(); - int nRows = I.rows * channels; - int nCols = I.cols; + int nRows = I.rows; + int nCols = I.cols * channels; if (I.isContinuous()) {