Read a QR Code from a picture of the brazilian tax receipt.
Warning: This only works for BRAZILIAN tax receipt!
These instructions will guide you to copy the project and running on your local machine.
Python 3.8.1 or higher must be installed.
- Download the project "tax_receipt".
- Install the libraries, use requirements.txt for automatic installation:
pip install -r requirements.txt
- Put a tax receipt in input folder (
path_in_image
). - Run the program (
python tax_receipt\tax_receipt.py
).
Obs: You can try the project with files from sample folder. This folder contains 3 files, 2 tax receipts (sample 1 and sample 2) and 1 similar to tax receipt (sample 3).
- Read a picture of the brazilian tax receipt from input folder (
path_in_image
). - Generate a unique identifier (uuid4) for the operation.
- Try to read QR Code:
- Success: Write the uuid and information extracted from QR Code in tax_receipt.csv - a text file semicolon separated - on output directory (
path_out_image
). - Fail: Do not write the uuid in a CSV file on output directory (
path_out_image
).
- Success: Write the uuid and information extracted from QR Code in tax_receipt.csv - a text file semicolon separated - on output directory (
- When the process end, it renames the picture with uuid and move to output directory (
path_out_file
).
The project use SemVer for versioning. For the versions available, see the tags on this repository.
- Leonardo Cezar - Initial work - paaarx
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Improve validation from QR Code values
- Let the input and output folders be defined in a Yaml file.
- Create more types of "writers" (default is csv), as json or database.
- Initially, it was my first idea for the Dev For a Change hackathon, when donors send pictures of the tax receipt via Whatsapp or Facebook Messenger, this solution automates the extraction of information from the tax receipt to fill out the forms and send it to the government. Unfortunately it was discarded.
Toss a coin to your Witcher.