You are here: Start » FIL.NET » Function Reference » Computer Vision » Optical Character Recognition » FIL.ReadText
Ready-to-use tool for reading text from images using the OCR technique.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ReadText ( IList<FilNet.Region> inCharacters, FilNet.OcrModel inOcrModel, float inMinScore, out string outText, IList<NullableRef<string>> outCharacters, IList<float> outScores, out bool outIsTextValid )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inCharacters | System.Collections.Generic.IList<FilNet.Region> | Character regions. | ||
![]() | inOcrModel | FilNet.OcrModel | OCR model specific to a particular font. | ||
![]() | inMinScore | float | <0.0f, 1.0f> | Minimal score of reading a character. | |
![]() | outText | string | Read text. | ||
![]() | outCharacters | System.Collections.Generic.IList<FilNet.NullableRef<string>> | Array of characters. NIL indicates invalid read when inMinScore is set,. | ||
![]() | outScores | System.Collections.Generic.IList<float> | Reading scores for each character. | ||
![]() | outIsTextValid | bool | Returns False if any ad score smaller than inMinScore. |
Description
This operation reads a text from the array of regions. Each region corresponds to a single letter at the filter output outText. Empty regions are omitted.
This filter uses a trained OcrModel which can be created using the TrainOcr_MLP or TrainOcr_SVM filter.
Typically this filter are connected with ExtractText which prepares input regions for reading.
Examples
![]() |
Result of reading text using the ReadText and ExtractText.
Remarks
To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Uninitialized OCR model in ReadText. OCR model must be trained before use. |