Personal tools


From MohidWiki

Jump to: navigation, search

Qrcode is a non-proprietary encoding of information into 2d codes. 2d codes are bidimensional matrices that encode information much like the traditional barcodes you find in supermarket products. Widely spread in Japan for some years now, it allows users with cameras on their mobile phones to scan the 2d code and extract the information. If it's a hyperlink, then the scanner software may open the phone's web browser and open the hyperlink page.

Hello world example


You can easily use the python library PyQrCodec (depends on the PIL library)

> sudo yum install opencv opencv-devel opencv-python
> wget
> tar -xvf Imaging-1.1.6.tar.gz
> cd Imaging-1.1.6
> python build
> sudo python install
> wget
> tar -xvf PyQrcodec_Linux.tar.gz
> cd PyQrcodec
> python build
> sudo python install

[python] >>> import PyQrCodec >>> size, image = PyQrCodec.encode("Hello world!") >>>"helloworld.jpg")

External links