path_image="cheetah.jpg"
img1 = cv2.imread(path_image,0)
scale_width = 640 / img1.shape[1]
scale_height = 480 / img1.shape[0]
scale = min(scale_width, scale_height)
window_width = int(img1.shape[1] * scale)
window_height = int(img1.shape[0] * scale)
cv2.namedWindow('image1', cv2.WINDOW_NORMAL)
cv2.resizeWindow('image1', window_width, window_height)
#set mouse callback function for window
cv2.setMouseCallback('image1', mouse_callback1)
cv2.imshow('image1', img1)
cv2.waitKey(0)
###
print("a")
我用opencv写了一个抓取image pixel的程式
想说在关闭影像的视窗后,继续做后续的处理。
但程式只执行到###之前就没有其他动作了,
请问我是少做了什么