python opencv test

 

 

import cv2
import numpy as np
from matplotlib import pyplot as plt

img = cv2.imread('20230222100736979.jpg', 0)
hist = cv2.calcHist([img], [0], None, [256], [0, 256])

plt.plot(hist)
plt.show()

  

 

#################

posted @ 2023-04-16 12:51  西北逍遥  阅读(6)  评论(0编辑  收藏  举报