Added detection of driver positions

This commit is contained in:
2023-04-05 15:53:50 +02:00
parent 41f7913b80
commit 3271580a1e
2 changed files with 24 additions and 2 deletions
+11 -1
View File
@@ -137,10 +137,20 @@ namespace OCR_Decode
page.Dispose();
return result;
}
protected string GetStringFromPng()
protected string GetStringFromPng(bool onlyDigit = false)
{
string result = "";
if (onlyDigit)
{
Engine.SetVariable("tessedit_char_whitelist", "0123456789");
}
else
{
Engine.SetVariable("tessedit_char_whitelist", "");
}
Bitmap rawData = WindowImage;
Bitmap enhancedImage = new OcrImage(rawData).Enhance();