OcrPreprocessingParameters
UseInvertModification
If true, inverts the colors of the screen image before the ocr detection. Even though both engine should be able to detect white text on dark background it can sometimes be helpful to first invert the image, especially when combining with other preprocessing.
Syntax: public bool UseInvertModification { get; set; }
UseGrayScaleModification
If true, convert the screen image to an 8-bit gray scale image.
Syntax: public bool UseGrayScaleModification { get; set; }
UseBinarizeModification
If true, apply the binarize modification on the image before the ocr detection, i.e. converting it to black and white. If no BinarizeThreshold is defined (or set to -1) this function applies binary segmentation to a bitmap automatically. If a BinarizeThreshold is defined this function applies binary segmentation to an image by converting everything darker than the threshold to black and everything lighter to white.
Syntax: public bool UseBinarizeModification { get; set; }
BinarizeThreshold
Defines the binarize threshold. Possible values are between 0 and 255. Set it to -1 to enable automatic binary segmentation. Default: -1 (AutoBinarize)
Syntax: public int BinarizeThreshold { get; set; }
UseSharpnessModification
If true, apply the sharpness modification on the image before the ocr detection based on the SharpnessValue property.
Syntax: public bool UseSharpnessModification { get; set; }
SharpnessValue
The amount to change the sharpness. Valid values range from -1000 to +1000. Negative sharpness values decrease the sharpness of the image. Specify -1000 for minimum sharpness. Positive sharpness values increase the sharpness. Specify +1000 for maximum sharpness. Default: 500.
Syntax: public int SharpnessValue { get; set; }
UseColorReplaceModification
If true, replaces the specified color with a defined new color on the screen image before the ocr detection. Can be helpful to change an alternating background to a single color background which often helps ocr detection.
Syntax: public bool UseColorReplaceModification { get; set; }
ColorReplaceColorToReplace
The color which should be replaced. Default: White.
Syntax: public Color ColorReplaceColorToReplace { get; set; }
ColorReplacementRangeOfColorsToReplace
The color range around the color which should be replaced. Value has to be between 0 to 1. Default: 0.1
Syntax: public double ColorReplacementRangeOfColorsToReplace { get; set; }
ColorReplacementNewColor
The new color which will be used to replace the defined colors. Default: White.
Syntax: public Color ColorReplacementNewColor { get; set; }
Last updated