diff --git a/.gitignore b/.gitignore index d816416..e0a2c45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ penny_dreadful_downloader/legality_data/ +a_scanner_dorkly/.venv/ MTG-Card-Identifier_v5.pdf info.txt diff --git a/a_scanner_dorkly/main.py b/a_scanner_dorkly/main.py new file mode 100755 index 0000000..f0d9da6 --- /dev/null +++ b/a_scanner_dorkly/main.py @@ -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()