Created
October 29, 2014 18:23
-
-
Save marthall/bded905a1bebd66f88de to your computer and use it in GitHub Desktop.
This file contains 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
from scipy.misc.pilutil import imread, imsave | |
import numpy as np | |
def gamma_correction(img, correction): | |
img = np.multiply(img, 1.0/255) | |
img = np.power(img, correction) | |
return img | |
einstein = imread('TestImages/Question 4/einstein_lowcontrast.png') | |
final_image = gamma_correction(einstein, 1) | |
imsave('task04.png', final_image) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment