I'm using python PYZBAR to decode QR code captured by real time cam.
decode(input_frame)
Naturally the output I get is as follows
[Decoded(data=b'DATA', type='QRCODE', rect=Rect(left=50, top=179, width=255, height=254), polygon=[Point(x=50, y=433), Point(x=305, y=424), Point(x=302, y=180), Point(x=51, y=179)], quality=1, orientation='UP')]
the output shows:
- The data stored in the QR Code.
- Code type (QRCODE).
- The position of each corner of the QR Code in the frame.
- Quality.
- And the orientation of the QR Code (whether it up, down, left or right).
I'm only concerned about the data stored in the QR Code and its Orientation
How can I define them as a variable to use them later, something like the following pseudo code:
x = orientation y = data stored in QR Code
if x == up && y == DATA:
...........
My goal is to read and decode QR Code data and orientation to navigate a robot like the video provided in the link.