微信二维码简介
zxing 代码分析
ZXing源码解析四:如何识别图片中的二维码
https://github.com/jenly1314/WeChatQRCode
Wechar移植
https://github.com/jenly1314/WeChatQRCodehttps://github.com/jenly1314/WeChatQRCode
python 验证ZXing/ ZBar的能力
ZXing
import zxing
reader = zxing.BarCodeReader()
barcode = reader.decode('file name')
print (barcode.parsed)
ZBar
from pyzbar import pyzbar
import cv2
image = cv.imread('file name')
barcodes = pyzbar.decode(image)
print (barcodes)
wechat_qrcode
import cv2
detector = cv2.wechat_qrcode_WeChatQRCode("detect.prototxt", "detect.caffemodel", "sr.prototxt", "sr.caffemodel")
img = cv2.imread("file name")
res, points = detector.detectAndDecode(img)
print(res, points)