From 6131a847a29314e39686810f3632a924ab071850 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 10 Jan 2013 14:45:00 +0400 Subject: [PATCH] Fix histogram calculation in equalizeHist issue #2678 --- modules/imgproc/src/histogram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index 3f0c3daa29..864b49b314 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -3023,7 +3023,7 @@ public: localHistogram[t0]++; localHistogram[t1]++; } - for (; x < width; ++x, ++ptr) + for (; x < width; ++x) localHistogram[ptr[x]]++; }