Fixed an issue with 'how_to_scan_images.cpp' tutorial code. Issue #2259
authorVsevolod Glumov <vsevolod.glumov@itseez.com>
Wed, 10 Oct 2012 23:51:34 +0000 (03:51 +0400)
committerVsevolod Glumov <vsevolod.glumov@itseez.com>
Wed, 10 Oct 2012 23:51:34 +0000 (03:51 +0400)
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp

index b020c5e..700e27f 100644 (file)
@@ -129,8 +129,8 @@ Mat& ScanImageAndReduceC(Mat& I, const uchar* const table)
 \r
     int channels = I.channels();\r
 \r
-    int nRows = I.rows * channels;\r
-    int nCols = I.cols;\r
+    int nRows = I.rows;\r
+    int nCols = I.cols * channels;\r
 \r
     if (I.isContinuous())\r
     {\r