Table of Contents

Class DocumentLayoutResult<T>

Namespace
AiDotNet.Document
Assembly
AiDotNet.dll

Represents the result of document layout detection.

public class DocumentLayoutResult<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
DocumentLayoutResult<T>
Inherited Members

Remarks

For Beginners: Layout detection identifies different parts of a document (text blocks, tables, figures, etc.) and their locations. This result class contains all the detected regions with their bounding boxes and types.

Properties

ProcessingTimeMs

Gets processing time in milliseconds.

public double ProcessingTimeMs { get; init; }

Property Value

double

ReadingOrder

Gets the reading order of text regions (if detected).

public IReadOnlyList<int>? ReadingOrder { get; init; }

Property Value

IReadOnlyList<int>

Regions

Gets the detected layout regions.

public IReadOnlyList<LayoutRegion<T>> Regions { get; init; }

Property Value

IReadOnlyList<LayoutRegion<T>>

TotalRegions

Gets the total number of detected regions.

public int TotalRegions { get; }

Property Value

int

Methods

GetHighConfidenceRegions(double)

Gets regions with confidence above a threshold.

public IEnumerable<LayoutRegion<T>> GetHighConfidenceRegions(double threshold)

Parameters

threshold double

Minimum confidence (0-1).

Returns

IEnumerable<LayoutRegion<T>>

Regions with confidence above the threshold.

GetRegionsByType(LayoutElementType)

Gets regions filtered by element type.

public IEnumerable<LayoutRegion<T>> GetRegionsByType(LayoutElementType elementType)

Parameters

elementType LayoutElementType

The type of elements to retrieve.

Returns

IEnumerable<LayoutRegion<T>>

Regions matching the specified type.