Friday, October 15, 2021

Scanning QR Code in Ubuntu Linux

To get the information from a qr code, first and foremost, we need to save the qr code as a file. One of the way is to use a webcam, and an app called cheese to take picture using the webcam. Then we need to install zbar-tools to extract information from the qr code file. 


Install cheese

$ sudo apt update; sudo apt install cheese -y

Install zbar-tools

$ sudo apt install zbar-tools -y


Then, take a picture of the qr code using cheese via our webcam.


Once we have the qr code saved in a file, use zbarimg to extract the information from the qr code

$ zbarimg Downloads/frame.png 

QR-Code:https://www.linuxwave.info

scanned 1 barcode symbols from 1 images in 0.04 seconds


You can see that in the above output, that the qr code contain a url to this website.

 


 


No comments: