Skip to content

Instantly share code, notes, and snippets.

@quocdat32461997

quocdat32461997/eq_hist.py

Last active Jan 27, 2020
Embed
What would you like to do?
def eq_hist(hist, colors, img_size):
hist = hist * colors / (2 * img_size)
cum_hist = hist.cumsum() #Cummulative histogram
equalized_hist = np.floor(cum_hist)
return equalized_hist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment