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)
|
||
|---|---|---|
| .. | ||
| doc | ||
| include/opencv2/imgproc | ||
| perf | ||
| src | ||
| test | ||
| CMakeLists.txt | ||