New to Telerik Document ProcessingStart a free 30-day trial

IOcrProvider

Interface

Contract for OCR engines that extract text from images for search, selection, or analysis.

Definition

Namespace:Telerik.Windows.Documents.Ocr

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

C#
public interface IOcrProvider

Derived Classes: TesseractOcrProvider

Properties

Gets or sets the parsing granularity used by the OCR engine (word- or line-level).

C#
OcrParseLevel ParseLevel { get; set; }

Methods

Extract all text from the image and return a single concatenated string.

C#
string GetAllTextFromImage(byte[] imageBytes)
Parameters:imageBytesbyte[]

The bytes of the image.

Returns:

string

The entire text as a string.

Extract text with word-level bounding boxes, returning a map of regions to recognized strings.

C#
Dictionary<Rectangle, string> GetTextFromImage(byte[] imageBytes)
Parameters:imageBytesbyte[]

The bytes of the image.

Returns:

Dictionary<Rectangle, string>

Words with corresponding bounding rectangles