Now you can see the preview of what the zone can see

This commit is contained in:
2022-10-20 10:42:09 +02:00
parent f0f78e81f9
commit ca37f8fdb4
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -79,7 +79,7 @@
// //
// tmrScreenshots // tmrScreenshots
// //
this.tmrScreenshots.Interval = 5000; this.tmrScreenshots.Interval = 1000;
this.tmrScreenshots.Tick += new System.EventHandler(this.tmrScreenshots_Tick); this.tmrScreenshots.Tick += new System.EventHandler(this.tmrScreenshots_Tick);
// //
// lsbScreens // lsbScreens
+3
View File
@@ -78,7 +78,10 @@ namespace TestVideo
extraction.UpdateZones(); extraction.UpdateZones();
pbxInput.Image = extraction.ScreenPreview; pbxInput.Image = extraction.ScreenPreview;
if(currentZoneIndex != -1) if(currentZoneIndex != -1)
{
tbxResult.Text = extraction.GetZoneRawText(currentZoneIndex); tbxResult.Text = extraction.GetZoneRawText(currentZoneIndex);
pbxOutput.Image = extraction.GetZoneData(currentZoneIndex);
}
//This is to prevent Ram from exploding //This is to prevent Ram from exploding
GC.Collect(); GC.Collect();
} }
+1
View File
@@ -83,6 +83,7 @@ namespace TestVideo
string result = ""; string result = "";
//To use this toImage you need : NuGet\Install-Package Emgu.CV.Bitmap -Version 4.5.5.4823 //To use this toImage you need : NuGet\Install-Package Emgu.CV.Bitmap -Version 4.5.5.4823
inputBmp = PrepareImage(inputBmp); inputBmp = PrepareImage(inputBmp);
ZoneData = inputBmp;
Image<Bgr, byte> emguImage = inputBmp.ToImage<Bgr, byte>(); Image<Bgr, byte> emguImage = inputBmp.ToImage<Bgr, byte>();
using (var image = emguImage) using (var image = emguImage)