이 코드 예제는 이미지에서 텍스트를 추출하기 위해 IronTesseract OCR (광학 문자 인식) 엔진을 사용하는 방법을 보여줍니다.
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
Dim ocr As New IronTesseract()
' Configure OCR engine
Using input As New OcrInput()
input.LoadImage("potter.tiff")
' Perform OCR
Dim result As OcrResult = ocr.ReadDocument(input)
Console.WriteLine(result.Text)
End Using