Last active
August 29, 2015 14:16
-
-
Save vizowl/2f965d21f91920eb37d4 to your computer and use it in GitHub Desktop.
Histogram 2
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
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.image as mpimg | |
import matplotlib.pyplot as plt | |
import numpy as np | |
img=mpimg.imread('image.jpg') | |
lum_img = img[:,:,0] | |
p = plt.hist(lum_img.flatten(), 256, range=(0.0,255), fc='k', ec='k') | |
plt.savefig('/output/out.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment