Class AdvancedOcrElement
Base class for advanced OCR elements (words and characters) that share spatial coordinate data.
Provides common properties for text content, bounding box coordinates, page number, region index, and confidence score.
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public abstract class AdvancedOcrElement : Object
Properties
BoundingBox
The bounding rectangle of this element in pixels, relative to the page image.
Declaration
public Rectangle BoundingBox { get; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Drawing.Rectangle |
Height
The height of the bounding box in pixels.
Declaration
public int Height { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
PageNumber
The 1-based page number where this element was found.
Declaration
public int PageNumber { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
RegionConfidence
OCR confidence score for the text region containing this element.
Value ranges from 0.0 (no confidence) to 1.0 (full confidence).
This is the region-level confidence; all elements within the same region share the same confidence value.
Declaration
public float RegionConfidence { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
RegionIndex
The 0-based index of the text region this element belongs to on its page.
Declaration
public int RegionIndex { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Text
The recognized text content.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Width
The width of the bounding box in pixels.
Declaration
public int Width { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
X
The X coordinate (left edge) of the bounding box in pixels, relative to the page image.
Declaration
public int X { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Y
The Y coordinate (top edge) of the bounding box in pixels, relative to the page image.
Declaration
public int Y { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |