Easy QR code generator and reader
This repository contains my implementation of QR Code generation and reader, and is based on qrcode
and OpenCV
.
Install required dependencies:
To install qrcode
from the command line:
pip install qrcode
To install opencv
from the command line:
pip install opencv-python
To create a QR code from a URL, run:
python3 QR_code_generator.py --url=<website-url>
You can also change the fill/background color or the box/border size:
python3 QR_code_generator.py --url=<website-url> --fill=<fill-color> --back=<background-color> --size=<box-size> --border=<border-size>
For example:
-
Input:
python3 QR_code_generator.py --url=https://yaelbenshalom.github.io
Output:
-
Input:
python3 QR_code_generator.py --url=https://yaelbenshalom.github.io --fill=yellow --back=green --border=1
Output:
Check out this QR code!
To decode a QR code from image, run:
python3 QR_code_reader.py --image=<image-name>
For example:
- Input:
Output:
python3 QR_code_reader.py --image=myQR.png
Website: https://yaelbenshalom.github.io
By the way, this is my personal portfolio. You should scan it and check it out!