Table of Contents

Class OCRResult<T>

Namespace
AiDotNet.Document
Assembly
AiDotNet.dll

Represents the result of OCR (Optical Character Recognition) processing.

public class OCRResult<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
OCRResult<T>
Inherited Members

Remarks

For Beginners: OCR converts images of text into machine-readable text. This result class contains the recognized text along with position information for each word, line, and block of text.

Properties

AverageConfidence

Gets the average confidence across all recognized text.

public T AverageConfidence { get; init; }

Property Value

T

Blocks

Gets the text blocks (paragraphs or regions).

public IReadOnlyList<OCRBlock<T>> Blocks { get; init; }

Property Value

IReadOnlyList<OCRBlock<T>>

DetectedLanguage

Gets the detected language code (ISO 639-1, e.g., "en", "zh").

public string? DetectedLanguage { get; init; }

Property Value

string

FullText

Gets the full recognized text from the document.

public string FullText { get; init; }

Property Value

string

Lines

Gets the recognized lines of text.

public IReadOnlyList<OCRLine<T>> Lines { get; init; }

Property Value

IReadOnlyList<OCRLine<T>>

ProcessingTimeMs

Gets processing time in milliseconds.

public double ProcessingTimeMs { get; init; }

Property Value

double

RequiresDeskewing

Gets whether the document appears to be rotated or skewed.

public bool RequiresDeskewing { get; init; }

Property Value

bool

RotationAngle

Gets the detected rotation angle in degrees if applicable.

public double? RotationAngle { get; init; }

Property Value

double?

Words

Gets the recognized words with their positions and confidence.

public IReadOnlyList<OCRWord<T>> Words { get; init; }

Property Value

IReadOnlyList<OCRWord<T>>