Files
video-subtitle-remover/backend/inpaint/utils/get_point_coor.py
YaoFANGUK 2b9360c299 init
2023-10-25 16:38:16 +08:00

13 lines
315 B
Python

import cv2
def click_event(event, x, y, flags, param):
if event == cv2.EVENT_LBUTTONDOWN:
print("Point coordinates ({}, {})".format(x, y))
img = cv2.imread("./example/remove-anything/dog.jpg")
cv2.imshow("Image", img)
cv2.setMouseCallback("Image", click_event)
cv2.waitKey(0)
cv2.destroyAllWindows()