Histogram Equalization, Opencv Python, Histogram Manipulation, Image Enhancement, Opencv.
pixels for pixel in image: histogram[pixel] += 1 # return our final result return histogram hist = get_histogram(flat, 256) plt.plot(hist) [<matplotlib.lines.Line2D at 0x1d0b4e4da90>] # create our cumulative sum function def cumsum(a): a = iter(a) b = [next(a)] for i in a: b.append(b[-1] + i)