diff --git a/AIParkingApplication/LaneIn.Designer.cs b/AIParkingApplication/LaneIn.Designer.cs
index 5708538..57d3555 100644
--- a/AIParkingApplication/LaneIn.Designer.cs
+++ b/AIParkingApplication/LaneIn.Designer.cs
@@ -38,10 +38,10 @@
this.lblCardType = new System.Windows.Forms.Label();
this.lblCardNumber = new System.Windows.Forms.Label();
this.grbCardInformation = new System.Windows.Forms.GroupBox();
+ this.button1 = new System.Windows.Forms.Button();
this.lblCardTime = new System.Windows.Forms.Label();
this.lblPlateString = new System.Windows.Forms.Label();
this.lblRecogizePlateStatus = new System.Windows.Forms.Label();
- this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).BeginInit();
this.grbPlateCamera.SuspendLayout();
@@ -53,8 +53,7 @@
//
// pictureBoxPlateImage
//
- this.pictureBoxPlateImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.pictureBoxPlateImage.Location = new System.Drawing.Point(226, 29);
+ this.pictureBoxPlateImage.Location = new System.Drawing.Point(226, 23);
this.pictureBoxPlateImage.Name = "pictureBoxPlateImage";
this.pictureBoxPlateImage.Size = new System.Drawing.Size(200, 200);
this.pictureBoxPlateImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -63,8 +62,7 @@
//
// pictureBoxPlateVideo
//
- this.pictureBoxPlateVideo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.pictureBoxPlateVideo.Location = new System.Drawing.Point(15, 29);
+ this.pictureBoxPlateVideo.Location = new System.Drawing.Point(15, 23);
this.pictureBoxPlateVideo.Name = "pictureBoxPlateVideo";
this.pictureBoxPlateVideo.Size = new System.Drawing.Size(200, 200);
this.pictureBoxPlateVideo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -76,16 +74,17 @@
this.grbPlateCamera.Controls.Add(this.pictureBoxPlateImage);
this.grbPlateCamera.Controls.Add(this.pictureBoxPlateVideo);
this.grbPlateCamera.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.grbPlateCamera.Location = new System.Drawing.Point(10, 199);
+ this.grbPlateCamera.Location = new System.Drawing.Point(1, 208);
+ this.grbPlateCamera.Margin = new System.Windows.Forms.Padding(0);
this.grbPlateCamera.Name = "grbPlateCamera";
- this.grbPlateCamera.Size = new System.Drawing.Size(441, 246);
+ this.grbPlateCamera.Size = new System.Drawing.Size(441, 237);
this.grbPlateCamera.TabIndex = 12;
this.grbPlateCamera.TabStop = false;
this.grbPlateCamera.Text = "Camera biển số";
//
// pictureBoxOverviewImage
//
- this.pictureBoxOverviewImage.Location = new System.Drawing.Point(226, 30);
+ this.pictureBoxOverviewImage.Location = new System.Drawing.Point(226, 24);
this.pictureBoxOverviewImage.Name = "pictureBoxOverviewImage";
this.pictureBoxOverviewImage.Size = new System.Drawing.Size(200, 200);
this.pictureBoxOverviewImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -94,7 +93,7 @@
//
// pictureBoxOverviewVideo
//
- this.pictureBoxOverviewVideo.Location = new System.Drawing.Point(15, 30);
+ this.pictureBoxOverviewVideo.Location = new System.Drawing.Point(15, 24);
this.pictureBoxOverviewVideo.Name = "pictureBoxOverviewVideo";
this.pictureBoxOverviewVideo.Size = new System.Drawing.Size(200, 200);
this.pictureBoxOverviewVideo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -106,9 +105,10 @@
this.grbOverviewCamera.Controls.Add(this.pictureBoxOverviewImage);
this.grbOverviewCamera.Controls.Add(this.pictureBoxOverviewVideo);
this.grbOverviewCamera.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.grbOverviewCamera.Location = new System.Drawing.Point(10, 456);
+ this.grbOverviewCamera.Location = new System.Drawing.Point(1, 454);
+ this.grbOverviewCamera.Margin = new System.Windows.Forms.Padding(0);
this.grbOverviewCamera.Name = "grbOverviewCamera";
- this.grbOverviewCamera.Size = new System.Drawing.Size(441, 247);
+ this.grbOverviewCamera.Size = new System.Drawing.Size(441, 238);
this.grbOverviewCamera.TabIndex = 11;
this.grbOverviewCamera.TabStop = false;
this.grbOverviewCamera.Text = "Camera toàn cảnh";
@@ -119,7 +119,8 @@
this.lblLaneLabel.BackColor = System.Drawing.Color.Red;
this.lblLaneLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLaneLabel.ForeColor = System.Drawing.SystemColors.Control;
- this.lblLaneLabel.Location = new System.Drawing.Point(10, 8);
+ this.lblLaneLabel.Location = new System.Drawing.Point(1, 1);
+ this.lblLaneLabel.Margin = new System.Windows.Forms.Padding(0);
this.lblLaneLabel.Name = "lblLaneLabel";
this.lblLaneLabel.Padding = new System.Windows.Forms.Padding(138, 5, 137, 5);
this.lblLaneLabel.Size = new System.Drawing.Size(441, 49);
@@ -130,7 +131,7 @@
// lblCardType
//
this.lblCardType.AutoSize = true;
- this.lblCardType.Location = new System.Drawing.Point(12, 55);
+ this.lblCardType.Location = new System.Drawing.Point(12, 64);
this.lblCardType.Name = "lblCardType";
this.lblCardType.Size = new System.Drawing.Size(60, 18);
this.lblCardType.TabIndex = 0;
@@ -139,7 +140,7 @@
// lblCardNumber
//
this.lblCardNumber.AutoSize = true;
- this.lblCardNumber.Location = new System.Drawing.Point(12, 22);
+ this.lblCardNumber.Location = new System.Drawing.Point(12, 31);
this.lblCardNumber.Name = "lblCardNumber";
this.lblCardNumber.Size = new System.Drawing.Size(51, 18);
this.lblCardNumber.TabIndex = 0;
@@ -153,17 +154,28 @@
this.grbCardInformation.Controls.Add(this.lblPlateString);
this.grbCardInformation.Controls.Add(this.lblCardNumber);
this.grbCardInformation.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.grbCardInformation.Location = new System.Drawing.Point(10, 61);
+ this.grbCardInformation.Location = new System.Drawing.Point(1, 55);
+ this.grbCardInformation.Margin = new System.Windows.Forms.Padding(0);
this.grbCardInformation.Name = "grbCardInformation";
- this.grbCardInformation.Size = new System.Drawing.Size(441, 82);
+ this.grbCardInformation.Size = new System.Drawing.Size(441, 104);
this.grbCardInformation.TabIndex = 13;
this.grbCardInformation.TabStop = false;
this.grbCardInformation.Text = "Thông tin thẻ";
//
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(360, 20);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
// lblCardTime
//
this.lblCardTime.AutoSize = true;
- this.lblCardTime.Location = new System.Drawing.Point(218, 55);
+ this.lblCardTime.Location = new System.Drawing.Point(223, 64);
this.lblCardTime.Name = "lblCardTime";
this.lblCardTime.Size = new System.Drawing.Size(68, 18);
this.lblCardTime.TabIndex = 0;
@@ -172,7 +184,7 @@
// lblPlateString
//
this.lblPlateString.AutoSize = true;
- this.lblPlateString.Location = new System.Drawing.Point(218, 22);
+ this.lblPlateString.Location = new System.Drawing.Point(223, 31);
this.lblPlateString.Name = "lblPlateString";
this.lblPlateString.Size = new System.Drawing.Size(58, 18);
this.lblPlateString.TabIndex = 0;
@@ -184,7 +196,8 @@
this.lblRecogizePlateStatus.BackColor = System.Drawing.Color.Green;
this.lblRecogizePlateStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRecogizePlateStatus.ForeColor = System.Drawing.SystemColors.Control;
- this.lblRecogizePlateStatus.Location = new System.Drawing.Point(10, 150);
+ this.lblRecogizePlateStatus.Location = new System.Drawing.Point(1, 159);
+ this.lblRecogizePlateStatus.Margin = new System.Windows.Forms.Padding(0);
this.lblRecogizePlateStatus.Name = "lblRecogizePlateStatus";
this.lblRecogizePlateStatus.Padding = new System.Windows.Forms.Padding(12, 6, 12, 6);
this.lblRecogizePlateStatus.Size = new System.Drawing.Size(441, 41);
@@ -192,16 +205,6 @@
this.lblRecogizePlateStatus.Text = "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ";
this.lblRecogizePlateStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
- // button1
- //
- this.button1.Location = new System.Drawing.Point(315, 24);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(75, 23);
- this.button1.TabIndex = 1;
- this.button1.Text = "button1";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
// LaneIn
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -211,8 +214,9 @@
this.Controls.Add(this.grbOverviewCamera);
this.Controls.Add(this.lblLaneLabel);
this.Controls.Add(this.grbCardInformation);
+ this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "LaneIn";
- this.Size = new System.Drawing.Size(460, 710);
+ this.Size = new System.Drawing.Size(443, 692);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).EndInit();
this.grbPlateCamera.ResumeLayout(false);
diff --git a/AIParkingApplication/LaneIn.cs b/AIParkingApplication/LaneIn.cs
index 6f58f56..9a35cce 100644
--- a/AIParkingApplication/LaneIn.cs
+++ b/AIParkingApplication/LaneIn.cs
@@ -47,12 +47,15 @@ namespace AIParkingApplication
{
Task.Factory.StartNew(new Action(async () =>
{
+ //TODO: check size before resizing
Cv2.Resize(videoFrame, videoFrame, new OpenCvSharp.Size(1280, 720));
Mat result = squarePlateDetector.DetectPlate(videoFrame);
+ //TODO: check size before resizing
Cv2.Resize(result, result, new OpenCvSharp.Size(272, 272));
OcrResult ocrResult = await Util.SendEngineRequestAsync(result, PlateType.Square);
+ //TODO: Exception Here
Bitmap resultPlateImage;
if (!string.IsNullOrEmpty(ocrResult.Ocr) && !string.IsNullOrEmpty(ocrResult.Plate))
{
diff --git a/AIParkingApplication/LaneIn.resx b/AIParkingApplication/LaneIn.resx
index 94c7a06..b7b59c0 100644
--- a/AIParkingApplication/LaneIn.resx
+++ b/AIParkingApplication/LaneIn.resx
@@ -156,6 +156,15 @@
True
+
+ True
+
+
+ True
+
+
+ True
+
True