Added laptime recognition (not precise enough yet tho)
This commit is contained in:
@@ -15,40 +15,6 @@ namespace OCR_Decode
|
||||
{
|
||||
Name = "Name";
|
||||
}
|
||||
/*
|
||||
public override object DecodePng()
|
||||
{
|
||||
string result = "";
|
||||
|
||||
Bitmap rawData = WindowImage;
|
||||
rawData = Window.ConvertToBlackAndWhite(rawData,150);
|
||||
|
||||
TesseractEngine engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default);
|
||||
var tessImage = Pix.LoadFromMemory(ImageToByte(WindowImage));
|
||||
|
||||
Page page = engine.Process(tessImage);
|
||||
Graphics g = Graphics.FromImage(rawData);
|
||||
// Get the iterator for the page layout
|
||||
using (var iter = page.GetIterator())
|
||||
{
|
||||
// Loop over the elements of the page layout
|
||||
iter.Begin();
|
||||
do
|
||||
{
|
||||
Rect boundingBox;
|
||||
// Get the bounding box for the current element
|
||||
if (iter.TryGetBoundingBox(PageIteratorLevel.Word, out boundingBox))
|
||||
{
|
||||
g.DrawRectangle(Pens.Red, new Rectangle(boundingBox.X1, boundingBox.Y1, boundingBox.Width, boundingBox.Height));
|
||||
}
|
||||
// Get the text for the current element
|
||||
result += iter.GetText(PageIteratorLevel.Word);
|
||||
} while (iter.Next(PageIteratorLevel.Word));
|
||||
}
|
||||
rawData.Save(Reader.DEBUG_DUMP_FOLDER + result + "_Before" + ".png");
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
public override object DecodePng(List<string> DriverList)
|
||||
{
|
||||
string result = "";
|
||||
|
||||
Reference in New Issue
Block a user