From e987a410d18a5d644997808babdc714b3d8690ef Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Fri, 19 Jun 2020 14:18:45 +0700 Subject: [PATCH] LaneIn - Add Constructor Params: isSupportSquarePlate, isSupportLongPlate --- AIParkingApplication/LaneIn.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AIParkingApplication/LaneIn.cs b/AIParkingApplication/LaneIn.cs index 21ccff2..71b0f74 100644 --- a/AIParkingApplication/LaneIn.cs +++ b/AIParkingApplication/LaneIn.cs @@ -12,12 +12,16 @@ namespace AIParkingApplication private Camera overviewCamera; private Camera plateCamera; private PlateProcessor plateProcessor; + private bool isSupportSquarePlate; + private bool isSupportLongPlate; private bool isRetryMode; - private bool isRetryModeUntilOk; + private bool isRetryModeUntilOk; //TODO: Test mode - public LaneIn(string plateStream, string overviewStream, bool isRetryMode = false, bool isRetryModeUntilOk = false) + public LaneIn(string plateStream, string overviewStream, bool isSupportSquarePlate = true, bool isSupportLongPlate = false, bool isRetryMode = false, bool isRetryModeUntilOk = false) { InitializeComponent(); + this.isSupportSquarePlate = isSupportSquarePlate; + this.isSupportLongPlate = isSupportLongPlate; this.isRetryMode = isRetryMode; this.isRetryModeUntilOk = isRetryModeUntilOk; overviewCamera = new Camera(overviewStream); @@ -32,7 +36,7 @@ namespace AIParkingApplication overviewCamera.Startcapture(); plateCamera.Startcapture(); - plateProcessor = new PlateProcessor(true, false); + plateProcessor = new PlateProcessor(this.isSupportSquarePlate, this.isSupportLongPlate); } private void OverviewCamera_OnOneVideoFrameRequested(Mat videoFrame) @@ -63,6 +67,7 @@ namespace AIParkingApplication { if (isRetryModeUntilOk) { + Thread.Sleep(500); CaptureAllCamera(); } else