我就废话不多说了,大家还是直接看代码吧!
import cv2
# 读取图片并缩放方便显示
img = cv2.imread('D:/6.jpg')
height, width = img.shape[:2]
size = (int(width * 0.2), int(height * 0.2))
# 缩放
img = cv2.resize(img, size, interpolation=cv2.INTER_AREA)
# BGR转化为HSV
HSV = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# 鼠标点击响应事件
def getposHsv(event,
2021-07-26 09:10:11
41KB
c
nc
op
1