ITextDetector<T>
Interfaces · AiDotNet.Document.Interfaces
Interface for text detection models that locate text regions in images.
Implements: IDocumentModel<T>
Known implementations: PSENet<T>, TRIE<T>
For Beginners
Text detection is the first step in reading text from images. It’s like highlighting all the places where text appears, but not actually reading it. After detection, a text recognizer reads the actual characters in each highlighted region.
Example usage:
How It Works
Text detection models find where text appears in an image without reading the text. They output bounding boxes (polygons or rectangles) around text regions.
Properties
| Property | Summary |
|---|---|
bool SupportsPolygonOutput { get; } |
Gets whether this detector outputs polygon bounding boxes (vs axis-aligned rectangles). |
bool SupportsRotatedText { get; } |
Gets whether this detector supports rotated text detection. |
int MinTextHeight { get; } |
Gets the minimum detectable text height in pixels. |
Methods
| Method | Summary |
|---|---|
Tensor<T> GetProbabilityMap(Tensor<T> image) |
Gets the probability map showing text likelihood at each pixel. |
TextDetectionResult<T> DetectText(Tensor<T> image) |
Detects text regions in an image. |
TextDetectionResult<T> DetectText(Tensor<T> image, double confidenceThreshold) |
Detects text regions with a custom confidence threshold. |