Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with QR Code
#3
The QR codes I made were made with the module qrcode.

They are .png images

To read the info contained, you can use cv2 (which gives computers eyes!):

import cv2
from pyzbar import pyzbar as pzb

qr = '/home/pedro/summer2023/OMR/21BE/21BE_QRcodes/21BE1/2125010102_曹宇_QR.png'

image = cv2.imread(qr)
decodedObjects = pzb.decode(image)
for obj in decodedObjects:
    print("Type:", obj.type)    
    print("Data: ", obj.data, "\n")
    # this is the content of the QR code as a string
    string=obj.data.decode('utf-8')
    print(f'The information in this QR code is: {string}') 
How to get an image from a PDF? Ask another question here, or look on the web!
Reply


Messages In This Thread
Help with QR Code - by Miisato - Jun-11-2024, 02:10 AM
RE: Help with QR Code - by Larz60+ - Jun-11-2024, 08:02 AM
RE: Help with QR Code - by Pedroski55 - Jun-11-2024, 08:37 AM
RE: Help with QR Code - by Gribouillis - Jun-11-2024, 08:37 AM
RE: Help with QR Code - by AdamHensley - Jun-17-2024, 02:49 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020