Fix equalization formula in equalizeHist function & rewrite in C++
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)
Showing
Please
register
or
sign in
to comment