Guest User

Untitled

a guest
Jan 22nd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import imageio
  2. import numpy as np
  3. from matplotlib.pyplot import *
  4. from matplotlib import pyplot as plt
  5. img = imread("lion.jpg")
  6. #
  7. red = img[:,:,0]
  8. green = img[:,:,1]
  9. blue = img[:,:,2]
  10. #print(np.mean(img)
  11. line = red[:,:]
  12. #here How to calculate the average grayscale profile?
  13. figure(figsize=(8,4))
  14. plot(line)
  15. plt.show()
Add Comment
Please, Sign In to add comment