Added a good Name recognition algorythm
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user