一.直方图 用于统计图片中各像素值: # 画一个图像各通道的直方图 def draw_hist(img): color = ('b', 'g', 'r') for i, col in enumerate(color): hist = cv.calcHist([img], [i], None, [256], [0, 256]) # print(hist.shape) plt.plot(hist, color=col) plt.xlim([0, 256]) plt.show() 计算直方图时使用ma…