スクリーンショットを読む
このコード例では、IronTesseract OCR<//code> エンジンを使用して、スクリーンショット画像からテキストを抽出する方法を示します。
準備はできましたか?
Nuget ダウンロード 5,299,091 | バージョン: 2025.12 リリース
using IronOcr;
using System;
using System.Linq;
// Instantiate OCR engine
var ocr = new IronTesseract();
using var inputScreenshot = new OcrInput();
inputScreenshot.LoadImage("screenshotOCR.png");
// Perform OCR
OcrPhotoResult result = ocr.ReadScreenShot(inputScreenshot);
// Output screenshot information
Console.WriteLine(result.Text);
Console.WriteLine(result.TextRegions.First().Region.X);
Console.WriteLine(result.TextRegions.Last().Region.Width);
Console.WriteLine(result.Confidence);Install-Package IronOcr
このコード例では、IronTesseract OCR<//code> エンジンを使用して、スクリーンショット画像からテキストを抽出する方法を示します。