def click(event, x, y, flags, param):
global upper_left_point
global lower_right_point
global current_mouse_pos
if event == cv2.EVENT_LBUTTONDOWN:
upper_left_point = [x, y]
if event == cv2.EVENT_LBUTTONUP:
lower_right_point = [x, y]
if event == cv2.EVENT_MOUSEMOVE:
current_mouse_pos = [x, y]
评论列表
文章目录