QR code (2D barcode) coding and decoding algorithms? [closed]

主宰稳场 提交于 2019-11-28 02:48:29

I have a colleague who worked on ZXing ("Zebra Crossing").

That's got a fair variety of platform support.

(In response to those asking about QR codes in PHP)

The Google Charts QR chart type might work for you, if you don't expect a lot of traffic, or if you can cache the images. It's extremely easy to use- just put the text to encode in the URL.

Here's a good LGPL library for encoding QR code libqrencode

Libqrencode is a C library for encoding data in a QR Code symbol, a kind of 2D symbology that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and is highly robust.

Here's a Google code project that decodes QR code - aimed at iPhone, but is LGPL and the source is available. Should be adaptable...

-Adam

http://www.swetake.com/qr/qr1_en.html

Just thought I'd mention this one which is explaining HOW they work.

Jaearess

PyQrCodec is a Python library for encoding Qr codes to a PNG and decoding them from a variety of image formats.

You can find c# example here http://twit88.com/home/opensource/qrcode for free (only need to register)

You can use zbar directly to decode the qrcode.

#!/usr/bin/python

from sys import argv
import zbar
import Image


# create a reader
scanner = zbar.ImageScanner()

# configure the reader
scanner.parse_config('enable')

# obtain image data    
pil = Image.open("base.png").convert('L')
width, height = pil.size
raw = pil.tostring()

# wrap image data
image = zbar.Image(width, height, 'Y800', raw)

# scan the image for barcodes
scanner.scan(image)

# extract results
for symbol in image:
    # do something useful with results
    print 'decoded', symbol.type, 'symbol', '"%s"' % symbol.data

# clean up
del(image)

You can try python-qrtools: https://launchpad.net/qr-tools It uses qrencode for generating and zbar for decoding (from webcam or a file ;-)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!