Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import imageio
- import numpy as np
- from matplotlib.pyplot import *
- from matplotlib import pyplot as plt
- img = imread("lion.jpg")
- #
- red = img[:,:,0]
- green = img[:,:,1]
- blue = img[:,:,2]
- #print(np.mean(img)
- line = red[:,:]
- #here How to calculate the average grayscale profile?
- figure(figsize=(8,4))
- plot(line)
- plt.show()
Add Comment
Please, Sign In to add comment