閱讀掃描文件
此程式碼範例示範如何使用 IronTesseract OCR(光學字元辨識)引擎從圖片中擷取文字。
準備開始了嗎?
Nuget 下載 5,896,332 | 版本: 2026.5 just released
using IronOcr;
using System;
// Instantiate OCR engine
var ocr = new IronTesseract();
// Configure OCR engine
using var input = new OcrInput();
input.LoadImage("potter.tiff");
// Perform OCR
OcrResult result = ocr.ReadDocument(input);
Console.WriteLine(result.Text);
Imports IronOcr
Imports System
' Instantiate OCR engine
Private ocr = New IronTesseract()
' Configure OCR engine
Private input = New OcrInput()
input.LoadImage("potter.tiff")
' Perform OCR
Dim result As OcrResult = ocr.ReadDocument(input)
Console.WriteLine(result.Text)
Install-Package IronOcr
此程式碼範例示範如何使用 IronTesseract OCR(光學字元辨識)引擎從圖片中擷取文字。