什么是ZBar?
ZBar是一个开源库,用于扫描、读取二维码和条形码。支持的二维码包括:EAN/UPC,QR等。

ubuntu16.04安装方式 

sudo apt-get install libzbar-dev

pip install zbar

# 亲测有效 centos7 安装方式 yum install python-devel yum install zbar-devel pip install zbar

 

python zbar识别二维码

from pyzbar.pyzbar import decode
from PIL import Image
image = iss
img = Image.open(image)
barcodes = decode(img)
for barcode in barcodes:
    url = barcode.data.decode("utf-8")
    print(url)

 

相关文章:

  • 2021-10-05
  • 2022-02-08
  • 2022-12-23
  • 2021-09-14
  • 2021-05-08
  • 2021-09-01
  • 2021-05-31
  • 2022-01-06
猜你喜欢
  • 2022-02-25
  • 2022-12-23
  • 2022-01-22
  • 2021-09-11
  • 2021-08-29
  • 2021-10-02
  • 2021-12-08
相关资源
相似解决方案