Added a good Name recognition algorythm

This commit is contained in:
2023-04-04 15:45:07 +02:00
parent e2aa7ae78e
commit bdb04bdf96
4 changed files with 133 additions and 4 deletions
+15
View File
@@ -38,6 +38,10 @@ namespace OCR_Decode
{
return " ";
}
public virtual Object DecodePng(List<string> drivers)
{
return " ";
}
public static byte[] ImageToByte(Image img)
{
using (var stream = new MemoryStream())
@@ -46,6 +50,17 @@ namespace OCR_Decode
return stream.ToArray();
}
}
public static bool IsADriver(List<string> drivers,string potentialDriver)
{
bool result = false;
//I cant use drivers.Contains because it has missmatched cases and all
foreach (string name in drivers)
{
if (name.ToUpper() == potentialDriver.ToUpper())
result = true;
}
return result;
}
public static Bitmap ConvertToBlackAndWhite(Bitmap inputBmp, int Treshold = 165)
{
Bitmap result = new Bitmap(inputBmp.Width, inputBmp.Height);