LaneIn - Remove field: isRetryModeUntilOk
This commit is contained in:
parent
b0b062788e
commit
b7eae98821
|
@ -18,7 +18,6 @@ namespace AIParkingApplication
|
|||
private bool isSupportLongPlate;
|
||||
private bool isAutoOpenDoor;
|
||||
private bool isRetryMode;
|
||||
private bool isRetryModeUntilOk; //TODO: Test mode
|
||||
private C3DeviceController c3Device;
|
||||
private ApiController apiController;
|
||||
|
||||
|
@ -30,8 +29,7 @@ namespace AIParkingApplication
|
|||
bool isSupportSquarePlate = true,
|
||||
bool isSupportLongPlate = false,
|
||||
bool isAutoOpenDoor = true,
|
||||
bool isRetryMode = false,
|
||||
bool isRetryModeUntilOk = false)
|
||||
bool isRetryMode = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.doorId = doorId;
|
||||
|
@ -40,7 +38,6 @@ namespace AIParkingApplication
|
|||
this.isSupportLongPlate = isSupportLongPlate;
|
||||
this.isAutoOpenDoor = isAutoOpenDoor;
|
||||
this.isRetryMode = isRetryMode;
|
||||
this.isRetryModeUntilOk = isRetryModeUntilOk;
|
||||
overviewCamera = new Camera(overviewStream);
|
||||
plateCamera = new Camera(plateStream);
|
||||
this.apiController = apiController;
|
||||
|
@ -71,7 +68,7 @@ namespace AIParkingApplication
|
|||
await Task.Delay(500);
|
||||
var videoFrame = plateCamera.CurrentFrame;
|
||||
|
||||
FinalPlateResult result = await ProcessFrameImage(plateProcessor, videoFrame, isRetryMode, isRetryModeUntilOk);
|
||||
FinalPlateResult result = await ProcessFrameImage(plateProcessor, videoFrame, isRetryMode);
|
||||
pictureBoxPlateImage.Invoke(new Action(() =>
|
||||
{
|
||||
pictureBoxPlateImage.Image?.Dispose();
|
||||
|
@ -134,7 +131,7 @@ namespace AIParkingApplication
|
|||
}
|
||||
}
|
||||
|
||||
private async Task<FinalPlateResult> ProcessFrameImage(PlateProcessor plateProcessor, Mat frame, bool isRetryMode, bool isRetryModeUntilOk)
|
||||
private async Task<FinalPlateResult> ProcessFrameImage(PlateProcessor plateProcessor, Mat frame, bool isRetryMode)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -143,19 +140,12 @@ namespace AIParkingApplication
|
|||
FinalPlateResult finalPlateResult = await plateProcessor.ProcessPlate(frame);
|
||||
|
||||
if (isRetryMode && !plateProcessor.IsPlateStringValid(finalPlateResult.PlateString))
|
||||
{
|
||||
if (isRetryModeUntilOk) //TODO: TestMode
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("ProcessFrameImage Retry Mode");
|
||||
Thread.Sleep(1000);
|
||||
overviewCamera.RequestCaptureOneFrame();
|
||||
finalPlateResult = await plateProcessor.ProcessPlate(frame);
|
||||
}
|
||||
}
|
||||
return finalPlateResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
Loading…
Reference in New Issue
Block a user