[問題] 關閉子視窗後繼續執行
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的程式
想說在關閉影像的視窗後,繼續做後續的處理。
但程式只執行到###之前就沒有其他動作了,
請問我是少做了甚麼
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.247.215
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1540901869.A.236.html
→
10/31 17:01,
6年前
, 1F
10/31 17:01, 1F
→
10/31 21:27,
6年前
, 2F
10/31 21:27, 2F
→
10/31 21:27,
6年前
, 3F
10/31 21:27, 3F
Python 近期熱門文章
PTT數位生活區 即時熱門文章