第七节 图像处理之直方图计算
第一课:绘制直方图
importcv2ascv
importnumpyasnp
frommatplotlibimportpyplotasplt
defplot_demo(image):
plt.hist(image.ravel(),256,[0,256])
plt.show()
defimage_hist(image):
color=('blue','green','red')
fori,colorinenumerate(color):
#计算直方图
hist=
下载地址
用户评论