Improved the old way of manually selecting windows, Added all the windows types and implemented them, You can now export to a bad json file
This commit is contained in:
@@ -16,6 +16,7 @@ namespace OCR_tester
|
||||
public MainZone(Image fullImage, Rectangle bounds) : base(fullImage, bounds)
|
||||
{
|
||||
AutoCalibrate();
|
||||
Name = "Main";
|
||||
}
|
||||
public void AutoCalibrate()
|
||||
{
|
||||
@@ -69,7 +70,7 @@ namespace OCR_tester
|
||||
Point windowLocation = new Point(0, (Rectangle.Y + Rectangle.Height / 2) - windowSize.Height / 2);
|
||||
windowRectangle = new Rectangle(windowLocation, windowSize);
|
||||
|
||||
Zones.Add(new Zone(ZoneImage, windowRectangle));
|
||||
Zones.Add(new DriverZone(ZoneImage, windowRectangle));
|
||||
}
|
||||
}
|
||||
public override Bitmap Draw()
|
||||
@@ -92,8 +93,8 @@ namespace OCR_tester
|
||||
int count2 = 0;
|
||||
foreach (Window w in z.Windows)
|
||||
{
|
||||
g.DrawRectangle(Pens.Blue,w.Bounds);
|
||||
w.WindowImage.Save(dir+"data"+count2+".png");
|
||||
g.DrawRectangle(Pens.Blue,new Rectangle(w.Bounds.X,w.Bounds.Y + count * z.Bounds.Height,w.Bounds.Width,w.Bounds.Height));
|
||||
w.WindowImage.Save(dir+w.Name+".png");
|
||||
count2++;
|
||||
}
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user