QR码(二维条码)编码和解码算法? [关闭]
题
寻找免费/开源代码或算法描述来编码(简单)和解码(硬)2D条形码二维码。
它似乎不是一个微不足道的问题,但它在日本如此受欢迎,必须有一些已经可用的东西......
解决方案
我有一位同事参与了 ZXing (“Zebra Crossing”)。
这得到了各种各样的平台支持。
其他提示
(回应那些询问PHP中QR码的人)
Google Charts QR图表类型可能适合您,如果您不期望大量流量,或者您可以缓存图像。它非常容易使用 - 只需将文本编入URL中即可。
QR Code Demystified - Part 1 点击
QR Code Demystified - Part 2
QR Code Demystified - Part 3
QR Code Demystified - Part 4
QR Code Demystified - Part 5
QR Code Demystified - Part 6
和
http://www.thonky.com/qr-code-tutorial/引入/
要了解其背后的数学理论,可以在Math Stackexchange中进行讨论
https://math.stackexchange.com/questions/76045/reed-solomon-polynomial - 发电机
这是一个很好的用于编码QR码的LGPL库 libqrencode
Libqrencode是一个C库 在QR码符号中编码数据,a 可以是一种二维符号系统 用便携式终端扫描 带CCD的手机。能力 QR码最多为7000位或4000 角色,非常强大。
这是针对iPhone的解码二维码的Google代码项目,但是是LGPL和源可用。应该适应......
- 亚当
http://www.swetake.com/qr/qr1_en.html
我想我会提到这个解释他们如何工作的那个。
PyQrCodec 是一个Python库,用于将Qr代码编码为PNG并从各种图像解码它们格式。
您可以在此处找到c#示例 http://twit88.com/home/opensource/qrcode免费(只需注册)
您可以直接使用zbar解码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)
你可以试试python-qrtools: https://launchpad.net/qr-tools 它使用qrencode生成和zbar进行解码(来自网络摄像头或文件; - )