Last active
January 27, 2020 08:19
-
-
Save quocdat32461997/5a2368835fc882e70801fe960b4d34c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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