Fixed the slowest drivers windows and cleaned some of the code
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/// Author : Maxime Rohmer
|
||||
/// Date : 08/05/2023
|
||||
/// Date : 30/05/2023
|
||||
/// File : Reader.cs
|
||||
/// Brief : Class used to Read the config file for the OCR
|
||||
/// Version : 0.1
|
||||
/// Version : Alpha 1.0
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -39,6 +39,8 @@ namespace Test_Merge
|
||||
/// <param name="imageNumber">The image #id on wich you want to create the zones on</param>
|
||||
public List<Zone> Load(Bitmap image, string configFilePath, ref List<string> driverListToFill, bool LoadOCR)
|
||||
{
|
||||
// Note : You may wonder why in the H... I have all the zones and windows stored in a JSON file and not just for example the first and the last
|
||||
// Its because they are not perfectly aligned to each others and every zone has his own alignement to the main image
|
||||
List<Zone> mainZones = new List<Zone>();
|
||||
Bitmap fullImage = image;
|
||||
Zone mainZone;
|
||||
@@ -225,10 +227,8 @@ namespace Test_Merge
|
||||
/// <param name="idImage">The id of the image we are working with</param>
|
||||
/// <returns>a string representation of all the returns</returns>
|
||||
public List<DriverData> Decode(List<Zone> mainZones, List<string> drivers)
|
||||
{
|
||||
string result = "";
|
||||
{
|
||||
List<DriverData> mainResults = new List<DriverData>();
|
||||
|
||||
//Decode
|
||||
for (int mainZoneId = 0; mainZoneId < mainZones.Count; mainZoneId++)
|
||||
{
|
||||
@@ -282,7 +282,10 @@ namespace Test_Merge
|
||||
mainResults = mainResults.OrderBy(driver => driver.Position).ToList();
|
||||
return mainResults;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the image in all of the zones wich then will do the same for theyre own subzones and windows
|
||||
/// </summary>
|
||||
/// <param name="Image">The new Image from the F1TV data channel</param>
|
||||
public void ChangeImage(Bitmap Image)
|
||||
{
|
||||
foreach (Zone z in MainZones)
|
||||
|
||||
Reference in New Issue
Block a user