diy:projets:qrdeciphering
Ceci est une ancienne révision du document !
Table des matières
Introduction
The goal of this program is to detect and decipher one or several QR codes in a picture.
Required Libraries
In order to decipher QR codes, we will use the QRLight library, installed as follow:
apt-get install libzbar0 libzbar-dev
pip install zbarlight
We will also use a number of standard Python libraries.
from PIL import Image import zbarlight from subprocess import Popen, PIPE import sys import datetime
Explanation
The program allows exactly one argument: the IP address of the Raspberry Pi whose camera we're going to be using.
To avoid any issue, we check that it is a valid IP address with the following function:
def isValidIPV4(adr): nums = adr.split('.') if len(nums) != 4: return False try: return all(0 <= int(num) < 256 for num in nums) except ValueError: return False
Work in Progress…
diy/projets/qrdeciphering.1527067825.txt.gz · Dernière modification : 2018/05/23 09:30 de ycaminade