python+openCV图像处理(十二)直方图
import cv2 as cvimport numpy as npfrom matplotlib import pyplot as pltdef plot_demo(image): plt.hist(image.ravel(), 256, [0, 256])#统计频次 plt.show("直方图")def image_hist(image): color = ('blue', 'green', 'red') for i, color in enume