LaneIn - Add Constructor Params: isSupportSquarePlate, isSupportLongPlate

This commit is contained in:
DucDangAnh 2020-06-19 14:18:45 +07:00
parent 13d591ada3
commit e987a410d1

View File

@ -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