Links

OcrEngineParameters

Accuracy

Defines the accuracy of the text search with the following meaning: 0.0 perfect match, 0.1 one white space difference, 0.2 one character matched the second guess 0.3 one character matched the third guess 0.5 one related character difference, 0.6 one related character difference based on the second guess, 0.7 one related character difference based on the third guess, 0.8 one character group replaced 1.0 one unrelated character difference
Defaults to t.Properties.OcrAccuracy
Syntax: public double Accuracy { get; set; }

EnableEndStringAnchor

If true it will be checked if the search string ends on a word boundary. If this is not the case it will lead to a higher accuracy. Only applies for SearchLevel.StringComparison. Default: false
Syntax: public bool EnableEndStringAnchor { get; set; }

EnableOverallAccuracy

If true the accuracy for all words is summed, otherwise just the highest accuracy per word is returned. Does not apply for SearchLevel.StringComparison. Default: false
Syntax: public bool EnableOverallAccuracy { get; set; }

EnableStartStringAnchor

If true it will be checked if the search string starts on a word boundary. If this is not the case it will lead to a higher accuracy. Only applies for SearchLevel.StringComparison. Default: false
Syntax: public bool EnableStartStringAnchor { get; set; }

EngineDependentParameters

Allows to add engine specific parameters, e.g. LEADOcrEngineParameters or IronOcrEngineParameters.
Usage:
var parameters = new OcrEngineParameters { /*...*/ }
var leadParas = new LEADOcrEngineParameters { /*...*/ };
parameters.EngineDependentParameters.Add(leadParas);
Syntax: public IList EngineDependentParameters { get; set; }

IgnoreCapitalization

Ignores the capitalization of the read characters Default: false
Syntax: public bool IgnoreCapitalization { get; set; }

IgnoreSpecialCharacters

If true all special characters will be ignored when finding the search text in the text read from the screen. Default: false
Syntax: public bool IgnoreSpecialCharacters { get; set; }

LanguagesToUse

Defines the languages the ocr engine will use for recognizing text (sequence does not define priority). Defaults to t.Properties.OcrLanguagesToUse.
Syntax: public OcrLanguages LanguagesToUse { get; set; }

OcrBoundaryColorTestImage

The color in which the detected characters are outlined on the debug image. Default: 0X3000FFFF; // cyan (82% transparent)
Syntax: public long OcrBoundaryColorTestImage { get; set; }

OcrEngine

Defines which ocr engine should be used. Can be either OcrEngines.LEADEngine (Offers 2nd and 3rd guesses for every character, which allows for better recognition of the search text when detection is not perfect) or OcrEngines.Template (Based on Tesseract; Performs better than LEAD on small text due to inbuilt image preprocessing). Defaults to t.Properties.DefaultOcrEngine
Syntax: public OcrEngines OcrEngine { get; set; }

OcrTextColorTestImage

The color in which the detected text is printed on the debug image. Default: 0XA0FF0000; // red (40% transparent)
Syntax: public long OcrTextColorTestImage { get; set; }

Preprocessing

Allows to enable different image modifications that are applied to the screen image before the ocr engine searches the text.
Syntax: public OcrPreprocessingParameters Preprocessing { get; set; }

PrioritizePartialPerfectMatch

If true strings which contain the exact search text are prioritized despite having a higher overall accuracy. Does not apply for SearchLevel.StringComparison. E.g. If the search text is "Hallo" and one text is "Hallx" and and an other is "Hallo123456789" the second text will be return
Syntax:

SearchLevel

Defines whether the text search should be based on detected Words, Lines and Paragraphs or instead the string should be serached character by character without interpreting word boundaries etc (StringComparison). It is possible to combine several SearchLevels with the OR (|) operator. The engine will then try all indicated SearchLevels and return the best match. Eg. SearchLevel = SearchLevel.StringComparison | SearchLevel.Line; Defaults to t.Properties.OcrSearchLevel
  • Words: Search for every word in the search string on every detected line of text and return the result containing those words.
  • Line: Search for every word in the search string on every detected line of text and return the result containing the whole detected line.
  • Paragraph: Search for every word in the search string in every detected paragraph of text and return the result containing the whole detected paragraph.
  • MultiLines: Search for every word in the search string anywhere in the detected text and return the result containing the whole detected text. This mode is helpful, when searching for a longer string and the ocr engine incorrectly detects a paragraph break in the search text.
  • StringComparison: Searches for the search string character by character without interpreting word boundaries etc
Syntax: public SearchLevel SearchLevel { get; set; }

SearchPattern

The search pattern allows you to prioritize specific character or character groups. If you do not start with ^ it will look for the specific character. If you start with ^ you have the options 0 = Digits, A/a = Char, X/x = Digit or Char, . = Punctuation, S = Separator, C = Control character. You can use + and * modifiers for multiple occurrences. You can use ! modifiers to activate case sensitivity. e.g. a^!+A^+0^aNumber
Syntax: public string SearchPattern { get; set; }

TestImagePath

The local directory to store the debug image of the OCR engine. Default: empty, debug image is not saved locally.
Syntax: public string TestImagePath { get; set; }

TreatSpecialCharactersAsSeparateWord

If true every special character will be treated as separate word. e.g. the text "Hallo+World" will be modified to "Hallo + World" Default: false
Syntax: public bool TreatSpecialCharactersAsSeparateWord { get; set; }

WordCountHasToMatch

If true the word count from the search text and the detected text have to match. Only applies to SearchLevel Line and Paragraph. Default: false
Syntax: public bool WordCountHasToMatch { get; set; }