Merge branch 'master' of https://git.wmi.amu.edu.pl/s439508/PCQRSCANER
This commit is contained in:
commit
74de674d28
@ -1,29 +1,29 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
import pyzbar.pyzbar as pyzbar
|
||||
import webbrowser
|
||||
|
||||
|
||||
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)
|
||||
|
||||
webbrowser.open(obj.data, new=2)
|
||||
|
||||
|
||||
cv2.imshow("Frame", frame)
|
||||
|
||||
key = cv2.waitKey(1)
|
||||
if key == 27:
|
||||
break
|
||||
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import pyzbar.pyzbar as pyzbar
|
||||
import webbrowser
|
||||
|
||||
|
||||
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)
|
||||
|
||||
webbrowser.open(obj.data, new=2) # OTWÓŻ PRZEGLĄDARKĘ, WYŚWIETL LINK Z KODU QR
|
||||
|
||||
|
||||
cv2.imshow("Frame", frame)
|
||||
|
||||
key = cv2.waitKey(1)
|
||||
if key == 27:
|
||||
break
|
||||
|
||||
|
||||
|
24
scaner.py
24
scaner.py
@ -1,24 +0,0 @@
|
||||
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user