Now the loading is trash but the OCR is starting to be fast

This commit is contained in:
2023-04-11 11:05:25 +02:00
parent fde3bcaae6
commit 0c84d468b2
10 changed files with 91 additions and 130 deletions
+3 -8
View File
@@ -16,7 +16,7 @@ namespace OCR_Decode
private Rectangle _bounds;
private Bitmap _image;
private string _name;
//protected static TesseractEngine Engine = null;
protected TesseractEngine Engine;
public Rectangle Bounds { get => _bounds; private set => _bounds = value; }
public Bitmap Image { get => _image; set => _image = value; }
public string Name { get => _name; protected set => _name = value; }
@@ -37,13 +37,8 @@ namespace OCR_Decode
{
Image = image;
Bounds = bounds;
/*
if (Engine == null)
{
Engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default);
Engine.DefaultPageSegMode = PageSegMode.SingleLine;
}
*/
Engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default);
Engine.DefaultPageSegMode = PageSegMode.SingleLine;
}
public virtual async Task<Object> DecodePng()
{