drop histo.py
This commit is contained in:
parent
8fcad15744
commit
0b9035d5d4
@ -4,7 +4,6 @@ django-cors-headers
|
|||||||
django-tastypie
|
django-tastypie
|
||||||
django<5
|
django<5
|
||||||
gunicorn
|
gunicorn
|
||||||
matplotlib==3.5.1
|
|
||||||
opencv-contrib-python==4.5.5.62
|
opencv-contrib-python==4.5.5.62
|
||||||
opencv-python==4.5.5.62
|
opencv-python==4.5.5.62
|
||||||
oss2
|
oss2
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
import cv2
|
|
||||||
import sys
|
|
||||||
import numpy as np
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
|
|
||||||
# 读取图像
|
|
||||||
print(sys.argv[1])
|
|
||||||
image = cv2.imread(sys.argv[1], cv2.IMREAD_COLOR)
|
|
||||||
|
|
||||||
# 计算直方图
|
|
||||||
hist = cv2.calcHist([image], [0], None, [256], [0, 256])
|
|
||||||
|
|
||||||
# 显示直方图
|
|
||||||
plt.plot(hist)
|
|
||||||
plt.xlim([0, 256])
|
|
||||||
plt.show()
|
|
||||||
Loading…
x
Reference in New Issue
Block a user