IRONSOFTWAREHOME
讀取 MICR 支票
using IronOcr;
using IronSoftware.Drawing;
using System;

// Create a new instance of IronTesseract for performing OCR operations
var ocr = new IronTesseract();

// Set the OCR language to MICR to recognize magnetic ink characters
// Must have MICR (IronOcr.Languages.MICR) installed beforehand
ocr.Language = OcrLanguage.MICR;

// Specify the file path of the input image containing MICR text
using (var input = new OcrInput())
{
    // Specify the MICR of the image to focus on for OCR (coordinates in pixels)
    var contentArea = new Rectangle(x: 124, y: 238, width: 309, height: 13);
    // Load the image with the defined content area
    input.LoadImage("micr.png", contentArea);
    // Run the OCR engine to read the MICR text from the input image
    var result = ocr.Read(input);

    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}
Imports IronOcr
Imports IronSoftware.Drawing
Imports System

' Create a new instance of IronTesseract for performing OCR operations
Dim ocr = New IronTesseract()

' Set the OCR language to MICR to recognize magnetic ink characters
' Must have MICR (IronOcr.Languages.MICR) installed beforehand
ocr.Language = OcrLanguage.MICR

' Specify the file path of the input image containing MICR text
Using input = New OcrInput()
    ' Specify the MICR of the image to focus on for OCR (coordinates in pixels)
    Dim contentArea = New Rectangle(x:=124, y:=238, width:=309, height:=13)
    ' Load the image with the defined content area
    input.LoadImage("micr.png", contentArea)
    ' Run the OCR engine to read the MICR text from the input image
    Dim result = ocr.Read(input)

    ' Output the recognized text to the console
    Console.WriteLine(result.Text)
End Using
NuGet Download
PM > Install-Package IronOcr
讀取 MICR 支票

讀取 MICR 支票

支票是一種值得信賴的方式來處理重大交易。 使用IronOCR,您可以可靠地處理E-13B MICR支票,以自動化銀行存款和其他金融工作流程。 專用引擎經過調整,以提供關鍵資訊(包括路由號碼、賬號和支票號碼)的最高準確性。

以下程式碼範例展示了如何僅需幾個簡單步驟掃描MICR支票。

程式碼說明

要讀取MICR支票,我們首先需要將OcrLanguage.MICR,以確保IronOCR能夠識別這次閱讀專為MICR支票。 但是,請注意必須在使用前安裝OcrLanguage.MICR套件,否則會拋出錯誤。

隨後,我們定義一個矩形作為我們的OCR區域,以指定IronOCR尋找MICR支票中的MICR部分,以確保最高的準確性。

隨後,我們調用LoadImage來載入您的支票圖像以及上一行中定義的內容區域。 最後,我們調用Read方法來掃描範例支票圖像。 然後列印出從OCR過程中提取的文字。

使用我們全面的C#指南,釋放MICR支票識別的力量!
在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天試用金鑰
無需信用卡或帳戶建立