Table of Contents

Class OcrResult

Namespace
LMKit.Extraction.Ocr
Assembly
LM-Kit.NET.dll

Represents the result of an OCR operation, encapsulating the recognized text and its optional positional layout within the source image.

public sealed class OcrResult
Inheritance
OcrResult
Inherited Members

Constructors

OcrResult(IEnumerable<TextElement>)

Initializes a new instance of the OcrResult class with a collection of structured text elements returned from the OCR process, with no initial formatted text or page dimension metadata.

OcrResult(IEnumerable<TextElement>, double, double, int, double)

Initializes a new instance of the OcrResult class with a collection of layout-aware text elements, page dimensions, rotation, and skew information.

OcrResult(string)

Initializes a new instance of the OcrResult class with plain unstructured text only, without any layout or bounding box information.

Properties

PageElement

Gets the underlying PageElement, which encapsulates all of the layout information for this OCR result—page dimensions (width, height), rotation, skew—and the full collection of TextElement instances.

PageHeight

Gets the height of the page in the original document, in points.

PageRotation

Gets the detected rotation of the page in degrees clockwise (e.g., 0, 90, 180, or 270).

PageSkew

Gets the detected skew angle of the page in degrees clockwise.

PageText

Gets the full textual content of the page as a single aggregated string.

PageWidth

Gets the width of the page in the original document, in points.

TextElements

Gets the collection of TextElement instances found on the page. Each text element may optionally include bounding box coordinates describing its layout.

Methods

FromJson(string)

Deserializes the specified JSON string into an OcrResult instance.

ToJson()

Serializes this OcrResult instance to a JSON-formatted string.