Untitled
import cv2 # 导入OpenCV模块 import matplotlib.pyplot as plt # 导入matplotlib模块 import numpy as np # 导入NumPy模块 img = cv2.imread('test.jpeg') # 读取名为'test.jpeg'的图像,并将其存储到变量img中 cv2.imshow('img',img) # 在名为'img'的窗口中显示读取的图像 cv2.waitKey(0) # 等待用户按下任意键 cv2.destroyAllWindows() # 关闭所有打开的窗口