Skip to content
Snippets Groups Projects
Commit 617ce147 authored by Tommy Persson's avatar Tommy Persson
Browse files

QR.

parent 70feaad3
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@ def image_callback(data):
frame_pil = PilImage.fromarray(scaledimg)
qr = qrcode.QRCode(box_size=10)
qr = qrcode.QRCode(box_size=6)
if options.qr_time:
timestamp = time.time()
qr.add_data(str(timestamp))
......@@ -172,13 +172,14 @@ def image_callback(data):
image_pub.publish(msg)
if options.decode:
retval, points = detector.detect(final_image)
print(retval, points)
if retval:
remembered_points = points
have_points = True
else:
print("FAILED TO FIND CODE, trying to use saved points")
if not have_points:
retval, points = detector.detect(final_image)
print(retval, points)
if retval:
remembered_points = points
have_points = True
else:
print("FAILED TO FIND CODE, trying to use saved points")
if have_points:
decoded_data, _ = detector.decode(final_image, remembered_points)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment