Class DocumentReader<T>
- Namespace
- AiDotNet.ComputerVision.OCR.EndToEnd
- Assembly
- AiDotNet.dll
Document reader for OCR with layout analysis.
public class DocumentReader<T>
Type Parameters
TThe numeric type used for calculations.
- Inheritance
-
DocumentReader<T>
- Inherited Members
Remarks
For Beginners: DocumentReader is optimized for reading structured documents like scanned papers, forms, and PDFs. Unlike scene text, documents have regular layouts with clear reading order. This reader analyzes the document structure and extracts text in logical reading order.
Key features: - Layout analysis for document structure understanding - Reading order detection - Paragraph and line grouping - Handles multi-column layouts - Optimized for clean text on uniform backgrounds
Constructors
DocumentReader(OCROptions<T>)
Creates a new document reader.
public DocumentReader(OCROptions<T> options)
Parameters
optionsOCROptions<T>
Properties
Name
Name of this document reader.
public string Name { get; }
Property Value
Methods
GetParameterCount()
Gets the total parameter count.
public long GetParameterCount()
Returns
ReadDocument(Tensor<T>)
Reads a document image and returns structured text.
public DocumentOCRResult<T> ReadDocument(Tensor<T> image)
Parameters
imageTensor<T>Document image tensor [batch, channels, height, width].
Returns
- DocumentOCRResult<T>
Document OCR result with layout information.