[英]Converting image to grayscale python
Can anyone help with the code to go after for loop to convert to grayscale either by average method or weighted method任何人都可以在for循环之后通过平均方法或加权方法将代码转换为go
import matplotlib.pyplot
import numpy
myImage = matplotlib.pyplot.imread('flower.png')
height=myImage.shape[0]
width=myImage.shape[1]
for x in range(0, height-1):
for y in range(0,width-1):
INSET CODE HERE
imgplot = matplotlib.pyplot.imshow(myImage)
matplotlib.pyplot.show()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.