Google 应用引擎 QR 码解码器

发布于 2024-09-16 06:30:44 字数 67 浏览 9 评论 0原文

我想知道是否有一个好的Python库来解码QR码。基本上我想要的是提供带有二维码的库图像,并且库将输出图像中保存的内容。

I was wondering if there is a good library for python for decoding QR code. Basically what I would like is to give library image with QR code on it and the library would output contents saved in image.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦开始←不甜 2024-09-23 06:30:44

您是否已经看过:http://pyqrcode.sourceforge.net/

如果代码编译不适用于你,那么还有纯Python实现: http://github.com/hcvst/pyqr

Have you already looked at : http://pyqrcode.sourceforge.net/

If code compiling does not work for you, then there is also pure python implementation at : http://github.com/hcvst/pyqr

朕就是辣么酷 2024-09-23 06:30:44

我以前看过没有成功。两个问题是无法编译本机 C 代码以及无法访问文件系统。

pyqrcode 没有成功,zxing 也没有成功。

I've looked before with no success. Two problems are that native c code can't be compiled and you can't get access to the file system.

pyqrcode didn't work out and neither did zxing.

奈何桥上唱咆哮 2024-09-23 06:30:44

如果一年后您仍在寻找执行此操作的方法,您应该查看 http://zbar 上的 ZBar 项目。 sourceforge.net/。看起来它最初是针对一维条形码,但现已扩展到包括 QR。它以 C 语言实现,获得 LGPL 许可,除了源代码之外,还具有适用于 Linux、Windows 和 iPhone 的二进制文件。可用于 Python、Perl、Ruby 的绑定。

截至 2011 年 8 月 17 日,ZBar 的核心图像处理部分自 2009 年以来尚未更新,但该项目的 iPhone 开发部分最近有活动,我将其解释为核心稳定。 SourceForge 论坛中也有一些针对该项目的活动。

pyxing (https://github.com/holizz/pyxing) 也可能可以工作,但所有这些都是端口的初始签入,因此由(可能的)用户来检查它。

If you're still looking for something to do this a year later, you should check the ZBar project at http://zbar.sourceforge.net/. It looks like it started out for 1-D barcodes but has been expanded to include QR. It's implemented in C, LGPL licensed, and in addition to source has binaries for Linux, Windows and iPhone. Bindings available for Python, Perl, Ruby.

As of August 17, 2011 the core image processing portion of ZBar hasn't been updated since 2009 but there is recent activity on the iPhone development part of the project, which I'll interpret as the core being stable. There's also some activity in the SourceForge forums for the project.

It's also possible that pyxing (https://github.com/holizz/pyxing) would work but all that's there is an initial checkin of the port, so it's up to the (possible) user to check it.

青衫负雪 2024-09-23 06:30:44

尝试 qrtools
,它有一个足够好的界面

from qrtools import QR
myCode = QR(filename=u"/home/psutton/Documents/Python/qrcodes/qrcode.png")
if myCode.decode():
  print myCode.data
  print myCode.data_type

输出

123456
text

Try qrtools
, It has a nice enough interface

from qrtools import QR
myCode = QR(filename=u"/home/psutton/Documents/Python/qrcodes/qrcode.png")
if myCode.decode():
  print myCode.data
  print myCode.data_type

Output

123456
text
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文