LapTime recognition has improved a lot
This commit is contained in:
@@ -34,11 +34,11 @@ namespace OCR_Decode
|
||||
switch (type)
|
||||
{
|
||||
case WindowType.LapTime:
|
||||
result = Grayscale(result);
|
||||
result = InvertColors(result);
|
||||
result = Tresholding(result, 165);
|
||||
result = Tresholding(result, 185);
|
||||
result = Resize(result);
|
||||
result = Resize(result);
|
||||
result = Dilatation(result,1);
|
||||
result = Erode(result,1);
|
||||
break;
|
||||
case WindowType.Text:
|
||||
result = Grayscale(result);
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace OCR_Decode
|
||||
} while (iter.Next(PageIteratorLevel.Word));
|
||||
}
|
||||
|
||||
//enhancedImage.Save(Reader.DEBUG_DUMP_FOLDER + Regex.Replace(rawResult, "[^0-9A-Za-z]", "") + ".png");
|
||||
enhancedImage.Save(Reader.DEBUG_DUMP_FOLDER + Regex.Replace(rawResult, "[^0-9A-Za-z]", "") + ".png");
|
||||
|
||||
List<string> rawNumbers;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace OCR_Decode
|
||||
result += iter.GetText(PageIteratorLevel.Word);
|
||||
} while (iter.Next(PageIteratorLevel.Word));
|
||||
}
|
||||
/*
|
||||
|
||||
if (allowedChars.Contains("S"))
|
||||
{
|
||||
enhancedImage.Save(Reader.DEBUG_DUMP_FOLDER + "Tyre" + result +".png");
|
||||
@@ -179,7 +179,7 @@ namespace OCR_Decode
|
||||
{
|
||||
enhancedImage.Save(Reader.DEBUG_DUMP_FOLDER + result +".png");
|
||||
}
|
||||
*/
|
||||
|
||||
page.Dispose();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user