mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
0bbba847a4
Old implementation did
lut[i] = 255 * (count(Y <= i)) / (width * height)
which actually shifts uniform histograms.
From now histogram is equalized as
C = count(Y == min(Y))
lut[i] = 255 * (count(Y <= i) - C) / (width * height - C)