python 的 PDF417 解码器

PDF417 decoder for python

我找遍了所有地方,只找到了与生成 PDF417 代码相关的信息,但没有找到有关如何对其进行解码的信息。在 python 中是否有一个库可以解码它们?我已经在检测图像中的代码并对其进行裁剪,但现在我需要一个解码器。

我找到了 this 一小段代码,它可以满足我的要求。它解码 PDF417 条形码。不过似乎没有那么强大,所以我想我必须对图像进行一些强大的处理才能仅提取条形码。

我知道有两个用于解码 PDF417 条形码的库。

您可以结帐python-zxing which is a python wrapper for the ZXing decoder or you can use pdf417decoder which is a native Python port of a C# PDF417 decoder library

ZXing 需要先将文件保存到磁盘,而 pdf417decoder 可以直接获取 PIL Image 对象。