Fixed the calibration and added the JSON serialising

This commit is contained in:
2023-05-05 15:00:39 +02:00
parent 2c2239427c
commit 16be9bf7ef
13 changed files with 205 additions and 72 deletions
+6 -3
View File
@@ -35,12 +35,15 @@ namespace Test_Merge
return sample;
}
}
public Window(Bitmap image, Rectangle bounds)
public Window(Bitmap image, Rectangle bounds, bool generateEngine = true)
{
Image = image;
Bounds = bounds;
Engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default);
Engine.DefaultPageSegMode = PageSegMode.SingleLine;
if (generateEngine)
{
Engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default);
Engine.DefaultPageSegMode = PageSegMode.SingleLine;
}
}
/// <summary>
/// Method that will have to be used by the childrens to let the model make them decode the images they have