Scanning QR code on Raspberry pi using ZBar.
We can use our Webcam to scan QR Codes with the help of a tool such as zbar tools. To use zbar tools, all you need to do is install it by typing:
sudo apt-get zbar-tools
Now verify how your webcam shows up by typing:
ls /dev/video*. You should get something like: /dev/video0. Now type the following command, replacing 0 with the number your video webcam showed at, and the zbarcam tool will show up
Provided that the camera is in focus, it should at this point be able to scan qr codes quite easily. Try to point it out at different qr codes and you should get the output in the terminal. You can check this on codes generated on the screen or on printed qr codes.
To generate a qr code, you can use a free online tool. http://goqr.me/ is a good one to start with. You can select what type of output it gives: a message, a website, or any other option.
Now, You can point the web camera to the qr code and, once it is in focus, it will read it and will display the output in the terminal.
Source: QR Code on Raspberry Pi
Current Project / Post can also be found using:
- qr code rasperry