Add a_scanner_dorkly
This commit is contained in:
parent
28014aade7
commit
7ffa1b0b24
|
@ -1,3 +1,4 @@
|
|||
penny_dreadful_downloader/legality_data/
|
||||
a_scanner_dorkly/.venv/
|
||||
MTG-Card-Identifier_v5.pdf
|
||||
info.txt
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
mouse_raw = (0, 0)
|
||||
|
||||
def clickEvent(event, x, y, flags, params):
|
||||
global mouse_raw
|
||||
|
||||
if event == cv2.EVENT_LBUTTONDOWN:
|
||||
mouse_raw = (x, y)
|
||||
print(mouse_raw)
|
||||
|
||||
cap = cv2.VideoCapture(0)
|
||||
cv2.namedWindow("image")
|
||||
cv2.setMouseCallback("image", clickEvent)
|
||||
|
||||
while True:
|
||||
success, img = cap.read()
|
||||
cv2.imshow("image", img)
|
||||
cv2.waitKey(0)
|
||||
|
||||
cv2.destroyAllWindows()
|
Loading…
Reference in New Issue