使用 Python 识别 CODE39 条码

通过您的 Python 应用程序扫描条码图像,无需安装任何其他软件.

 

对于尝试通过 Python 应用程序扫描自定义 CODE39 条形码图像的开发人员, Aspose.Total for Python via .NET API 可根据业务需求,帮助自动化读取和识别任何颜色或尺寸的条码。 它是处理不同格式以及一维、二维和邮政条码的各种 API 的完整包。 作为 Aspose.Total for Python via .NET 包一部分的 Aspose.BarCode for Python via .NET API 使这个扫描过程变得简单。 此外,开发人员可以调整识别引擎的参数,以实现快速条码扫描或提高读取准确性。

如何在 Python 中识别 CODE39 条码

  • 使用带有 DecodeType.AllSupportedTypes 的 BarCodeReader 类对象作为参数
  • 通过调用read_bar_codes()获取所有CODE39代码
  • 遍历所有结果以打印它

认可要求

  • 对于 CODE39 条形码扫描,需要 Python 3.5 或更高版本
  • 直接从 PyPI ( Aspose.BarCode ) 引用项目中的 API
  • 或者使用以下 pip 命令pip install aspose-barcode-for-python-via-net
  • 此外,基于 Microsoft Windows 或 Linux 的操作系统(参见 BarCode 的更多信息)
 

在 Python 中识别 CODE39 符号条形码

from aspose.barcode import barcoderecognition
reader = barcoderecognition.BarCodeReader(<file name>, barcoderecognition.DecodeType.AllSupportedTypes)
recognized_results = reader.read_bar_codes()
for barcode in recognized_results:
print(barcode.code_text)
 

探索扫码机 Python 选项

扫描 AUSTRALIAPOST 条码 (Australia Post Code)
扫描 AZTEC 条码 (Aztec 2D Barcode)
扫描 CODE16K 条码 (Code 16K Barcode)
扫描 CODE32 条码 (CODE 32 Barcode)
扫描 CODE39 条码 (Code 39 Standard)
扫描 CODE93 条码 (Code 93 Standard)
扫描 CODEBLOCK 条码 (CodablockF Barcode)
扫描 DATABAR 条码 (GS1 DataBar (Reduced Space Symbology))
扫描 DATALOGIC2OF5 条码 (Datalogic 2 of 5 Barcode)
扫描 DATAMATRIX 条码 (Data Matrix Code)
扫描 DEUTSCHEPOST 条码 (Deutsche Post Leitcode)
扫描 DOTCODE 条码 (DotCode 2D Barcode)
扫描 DUTCHKIX 条码 (Dutch KIX Barcode)
扫描 EAN 条码 (European Article Number)
扫描 IATA2OF5 条码 (IATA 2 of 5 Barcode)
扫描 INTERLEAVED2OF5 条码 (Interleaved 2 of 5 Barcode)
扫描 ISBN 条码 (International Standard Book Number)
扫描 ISMN 条码 (International Standard Music Number)
扫描 ISSN 条码 (International Standard Serial Number)
扫描 ITALIANPOST25 条码 (ItalianPost25 Code)
扫描 ITF 条码 (Interleaved 2 of 5 (ITF))
扫描 MATRIX2OF5 条码 (Matrix 2 of 5 Barcode)
扫描 ONECODE 条码 (USPS 4-State Customer Barcode)
扫描 PDF417 条码 (PDF417 Code)
扫描 QR 条码 (Quick Response Code)
扫描 RM4SCC 条码 (Royal Mail 4-State Customer Code)
扫描 SINGAPOREPOST 条码 (Singapore Post QR Code)
扫描 STANDARD2OF5 条码 (Code 25 Interleaved)
扫描 SWISSPOSTPARCEL 条码 (Swiss Post Parcel Code)

什么是 CODE39 条码

Code 39 是一种可变长度的离散条形码符号。它是第一个开发的字母数字符号系统,至今仍在广泛使用。 Code 39 用于各种应用,包括库存控制、运输标签和身份证。 Code 39 是一种自检符号体系,这意味着每个字符都使用独特的条和空格组合进行编码。这允许在没有校验和的情况下读取 Code 39,使其比其他一些条码符号更容易实施。 Code 39 也称为 Code 3 of 9、Code 3/9 和 USD-3。