
import numpy as np
import cv2
width = 200
height = 100
img = np.ones((height,width),np.uint8)*255
cv2.imshow("img",img)
cv2.waitKey(-1000)
cv2.destroyAllWindows()

'''
import cv2
 
# 打开一个窗口
cv2.namedWindow('window', cv2.WINDOW_NORMAL) 
# 显示一个图片
image = cv2.imread('d:\1.jpg')
cv2.imshow('window', image) 
while True:
    # 等待键盘输入
    key = cv2.waitKey(0) & 0xFF 
    # 检查按键，如果是 'q'，则退出
    if key == ord('q'):
        break 
# 关闭所有窗口
cv2.destroyAllWindows()
'''
