IRONSOFTWAREHOME
读取车牌
using IronOcr;
using IronSoftware.Drawing;

// Instantiate OCR engine
var ocr = new IronTesseract();

using var inputLicensePlate = new OcrInput();

inputLicensePlate.LoadImage("LicensePlate.jpeg");

// Perform OCR
OcrLicensePlateResult result = ocr.ReadLicensePlate(inputLicensePlate);

// Retrieve license plate coordinates
Rectangle rectangle = result.Licenseplate;

// Retrieve license plate value
string output = result.Text;
Imports IronOcr
Imports IronSoftware.Drawing

' Instantiate OCR engine
Dim ocr = New IronTesseract()

Using inputLicensePlate = New OcrInput()

    inputLicensePlate.LoadImage("LicensePlate.jpeg")

    ' Perform OCR
    Dim result As OcrLicensePlateResult = ocr.ReadLicensePlate(inputLicensePlate)

    ' Retrieve license plate coordinates
    Dim rectangle As Rectangle = result.Licenseplate

    ' Retrieve license plate value
    Dim output As String = result.Text

End Using
NuGet Download
PM > Install-Package IronOcr
读取车牌

读取车牌

这种方法有效地从图像中提取车牌号码,使用 IronTesseract OCR 引擎。此示例说明:

  1. IronTesseract 初始化:创建一个 IronTesseract 实例以处理OCR操作。
  2. 图像加载:使用 OcrInput 类加载包含车牌的图像文件。
  3. OCR 过程:在 OcrInput 对象上使用 Read 方法,执行OCR并识别图像中的文本。 4.结果分析:对识别出的词语进行迭代。 如果将任何单词识别为车牌号,则打印其文本和边界框。

这段代码在停车管理、车辆出入控制和自动识别系统等应用中特别有用。

了解如何使用 IronOCR 读取车牌
在 GitHub 上查看

准备开始了吗?

Nuget Downloads 6,236,385版本:2026.9刚刚发布

Key in blue circle

立即获取免费的 30 天试用版密钥

Your trial license will be sent to your email address

无任何限制。100% 解锁。无需信用卡。

bullet_checked无需信用卡或创建账户无任何限制。100% 解锁。无需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
获取您的无义务咨询
填写下面的表格或通过sales@ironsoftware.com
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户