From 2d69ece87a462eb732758b9a91027ff2330d0e41 Mon Sep 17 00:00:00 2001 From: Mikolaj Date: Tue, 17 Dec 2019 17:56:51 +0100 Subject: [PATCH] 2 --- scaner.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scaner.py diff --git a/scaner.py b/scaner.py new file mode 100755 index 0000000..51e05ef --- /dev/null +++ b/scaner.py @@ -0,0 +1,24 @@ + + +import cv2 +import numpy as np +import pyzbar.pyzbar as pyzbar + + +cap = cv2.VideoCapture(0) +font = cv2.FONT_HERSHEY_PLAIN + +while True: + _, frame = cap.read() + + decodedObjects = pyzbar.decode(frame) + for obj in decodedObjects: + #print("Data", obj.data) + cv2.putText(frame, str(obj.data), (50, 50), font, 2, # POKAĆ» NA EKRAN NAPIS Z LINKU KODU QR + (255, 0, 0), 3) + + cv2.imshow("Frame", frame) + + key = cv2.waitKey(1) + if key == 27: + break