28 lines
791 B
C#
28 lines
791 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Tesseract;
|
|
|
|
namespace OCR_Decode
|
|
{
|
|
internal class DriverSector1Window : Window
|
|
{
|
|
public DriverSector1Window(Bitmap image, Rectangle bounds) : base(image, bounds)
|
|
{
|
|
Name = "Sector 1";
|
|
}
|
|
public override async Task<object> DecodePng()
|
|
{
|
|
using (var Engine = new TesseractEngine(TESS_DATA_FOLDER.FullName, "eng", EngineMode.Default))
|
|
{
|
|
Engine.DefaultPageSegMode = PageSegMode.SingleLine;
|
|
int result = await GetTimeFromPng(WindowImage,OcrImage.WindowType.Sector,Engine);
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
}
|