Add a_scanner_dorkly

This commit is contained in:
The Magician 2024-08-17 20:13:04 +01:00
parent 28014aade7
commit 7ffa1b0b24
2 changed files with 25 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
penny_dreadful_downloader/legality_data/ penny_dreadful_downloader/legality_data/
a_scanner_dorkly/.venv/
MTG-Card-Identifier_v5.pdf MTG-Card-Identifier_v5.pdf
info.txt info.txt

24
a_scanner_dorkly/main.py Executable file
View File

@ -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()