Compare commits
No commits in common. "b731d248800d9cf1d47fe6826e15221eb66aa9f8" and "c8a5a489f6573e2a8de18268413c7262834e7708" have entirely different histories.
b731d24880
...
c8a5a489f6
|
@ -37,9 +37,6 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
|
<Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\OpenCvSharp4.4.3.0.20200524\lib\net461\OpenCvSharp.dll</HintPath>
|
<HintPath>..\packages\OpenCvSharp4.4.3.0.20200524\lib\net461\OpenCvSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -51,9 +48,6 @@
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
35
AIParkingApplication/LaneIn.Designer.cs
generated
35
AIParkingApplication/LaneIn.Designer.cs
generated
|
@ -41,7 +41,6 @@
|
||||||
this.lblCardTime = new System.Windows.Forms.Label();
|
this.lblCardTime = new System.Windows.Forms.Label();
|
||||||
this.lblPlateString = new System.Windows.Forms.Label();
|
this.lblPlateString = new System.Windows.Forms.Label();
|
||||||
this.lblRecogizePlateStatus = 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.pictureBoxPlateImage)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).BeginInit();
|
||||||
this.grbPlateCamera.SuspendLayout();
|
this.grbPlateCamera.SuspendLayout();
|
||||||
|
@ -76,7 +75,7 @@
|
||||||
this.grbPlateCamera.Controls.Add(this.pictureBoxPlateImage);
|
this.grbPlateCamera.Controls.Add(this.pictureBoxPlateImage);
|
||||||
this.grbPlateCamera.Controls.Add(this.pictureBoxPlateVideo);
|
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.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(9, 250);
|
||||||
this.grbPlateCamera.Name = "grbPlateCamera";
|
this.grbPlateCamera.Name = "grbPlateCamera";
|
||||||
this.grbPlateCamera.Size = new System.Drawing.Size(441, 246);
|
this.grbPlateCamera.Size = new System.Drawing.Size(441, 246);
|
||||||
this.grbPlateCamera.TabIndex = 12;
|
this.grbPlateCamera.TabIndex = 12;
|
||||||
|
@ -106,7 +105,7 @@
|
||||||
this.grbOverviewCamera.Controls.Add(this.pictureBoxOverviewImage);
|
this.grbOverviewCamera.Controls.Add(this.pictureBoxOverviewImage);
|
||||||
this.grbOverviewCamera.Controls.Add(this.pictureBoxOverviewVideo);
|
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.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(9, 502);
|
||||||
this.grbOverviewCamera.Name = "grbOverviewCamera";
|
this.grbOverviewCamera.Name = "grbOverviewCamera";
|
||||||
this.grbOverviewCamera.Size = new System.Drawing.Size(441, 247);
|
this.grbOverviewCamera.Size = new System.Drawing.Size(441, 247);
|
||||||
this.grbOverviewCamera.TabIndex = 11;
|
this.grbOverviewCamera.TabIndex = 11;
|
||||||
|
@ -119,7 +118,7 @@
|
||||||
this.lblLaneLabel.BackColor = System.Drawing.Color.Red;
|
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.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.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
this.lblLaneLabel.Location = new System.Drawing.Point(10, 8);
|
this.lblLaneLabel.Location = new System.Drawing.Point(9, 10);
|
||||||
this.lblLaneLabel.Name = "lblLaneLabel";
|
this.lblLaneLabel.Name = "lblLaneLabel";
|
||||||
this.lblLaneLabel.Padding = new System.Windows.Forms.Padding(138, 5, 137, 5);
|
this.lblLaneLabel.Padding = new System.Windows.Forms.Padding(138, 5, 137, 5);
|
||||||
this.lblLaneLabel.Size = new System.Drawing.Size(441, 49);
|
this.lblLaneLabel.Size = new System.Drawing.Size(441, 49);
|
||||||
|
@ -130,7 +129,7 @@
|
||||||
// lblCardType
|
// lblCardType
|
||||||
//
|
//
|
||||||
this.lblCardType.AutoSize = true;
|
this.lblCardType.AutoSize = true;
|
||||||
this.lblCardType.Location = new System.Drawing.Point(12, 55);
|
this.lblCardType.Location = new System.Drawing.Point(12, 77);
|
||||||
this.lblCardType.Name = "lblCardType";
|
this.lblCardType.Name = "lblCardType";
|
||||||
this.lblCardType.Size = new System.Drawing.Size(60, 18);
|
this.lblCardType.Size = new System.Drawing.Size(60, 18);
|
||||||
this.lblCardType.TabIndex = 0;
|
this.lblCardType.TabIndex = 0;
|
||||||
|
@ -139,7 +138,7 @@
|
||||||
// lblCardNumber
|
// lblCardNumber
|
||||||
//
|
//
|
||||||
this.lblCardNumber.AutoSize = true;
|
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.Name = "lblCardNumber";
|
||||||
this.lblCardNumber.Size = new System.Drawing.Size(51, 18);
|
this.lblCardNumber.Size = new System.Drawing.Size(51, 18);
|
||||||
this.lblCardNumber.TabIndex = 0;
|
this.lblCardNumber.TabIndex = 0;
|
||||||
|
@ -147,15 +146,14 @@
|
||||||
//
|
//
|
||||||
// grbCardInformation
|
// grbCardInformation
|
||||||
//
|
//
|
||||||
this.grbCardInformation.Controls.Add(this.button1);
|
|
||||||
this.grbCardInformation.Controls.Add(this.lblCardType);
|
this.grbCardInformation.Controls.Add(this.lblCardType);
|
||||||
this.grbCardInformation.Controls.Add(this.lblCardTime);
|
this.grbCardInformation.Controls.Add(this.lblCardTime);
|
||||||
this.grbCardInformation.Controls.Add(this.lblPlateString);
|
this.grbCardInformation.Controls.Add(this.lblPlateString);
|
||||||
this.grbCardInformation.Controls.Add(this.lblCardNumber);
|
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.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(9, 69);
|
||||||
this.grbCardInformation.Name = "grbCardInformation";
|
this.grbCardInformation.Name = "grbCardInformation";
|
||||||
this.grbCardInformation.Size = new System.Drawing.Size(441, 82);
|
this.grbCardInformation.Size = new System.Drawing.Size(441, 113);
|
||||||
this.grbCardInformation.TabIndex = 13;
|
this.grbCardInformation.TabIndex = 13;
|
||||||
this.grbCardInformation.TabStop = false;
|
this.grbCardInformation.TabStop = false;
|
||||||
this.grbCardInformation.Text = "Thông tin thẻ";
|
this.grbCardInformation.Text = "Thông tin thẻ";
|
||||||
|
@ -163,7 +161,7 @@
|
||||||
// lblCardTime
|
// lblCardTime
|
||||||
//
|
//
|
||||||
this.lblCardTime.AutoSize = true;
|
this.lblCardTime.AutoSize = true;
|
||||||
this.lblCardTime.Location = new System.Drawing.Point(218, 55);
|
this.lblCardTime.Location = new System.Drawing.Point(218, 77);
|
||||||
this.lblCardTime.Name = "lblCardTime";
|
this.lblCardTime.Name = "lblCardTime";
|
||||||
this.lblCardTime.Size = new System.Drawing.Size(68, 18);
|
this.lblCardTime.Size = new System.Drawing.Size(68, 18);
|
||||||
this.lblCardTime.TabIndex = 0;
|
this.lblCardTime.TabIndex = 0;
|
||||||
|
@ -172,7 +170,7 @@
|
||||||
// lblPlateString
|
// lblPlateString
|
||||||
//
|
//
|
||||||
this.lblPlateString.AutoSize = true;
|
this.lblPlateString.AutoSize = true;
|
||||||
this.lblPlateString.Location = new System.Drawing.Point(218, 22);
|
this.lblPlateString.Location = new System.Drawing.Point(218, 31);
|
||||||
this.lblPlateString.Name = "lblPlateString";
|
this.lblPlateString.Name = "lblPlateString";
|
||||||
this.lblPlateString.Size = new System.Drawing.Size(58, 18);
|
this.lblPlateString.Size = new System.Drawing.Size(58, 18);
|
||||||
this.lblPlateString.TabIndex = 0;
|
this.lblPlateString.TabIndex = 0;
|
||||||
|
@ -184,7 +182,7 @@
|
||||||
this.lblRecogizePlateStatus.BackColor = System.Drawing.Color.Green;
|
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.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.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
this.lblRecogizePlateStatus.Location = new System.Drawing.Point(10, 150);
|
this.lblRecogizePlateStatus.Location = new System.Drawing.Point(9, 197);
|
||||||
this.lblRecogizePlateStatus.Name = "lblRecogizePlateStatus";
|
this.lblRecogizePlateStatus.Name = "lblRecogizePlateStatus";
|
||||||
this.lblRecogizePlateStatus.Padding = new System.Windows.Forms.Padding(12, 6, 12, 6);
|
this.lblRecogizePlateStatus.Padding = new System.Windows.Forms.Padding(12, 6, 12, 6);
|
||||||
this.lblRecogizePlateStatus.Size = new System.Drawing.Size(441, 41);
|
this.lblRecogizePlateStatus.Size = new System.Drawing.Size(441, 41);
|
||||||
|
@ -192,16 +190,6 @@
|
||||||
this.lblRecogizePlateStatus.Text = "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ";
|
this.lblRecogizePlateStatus.Text = "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ";
|
||||||
this.lblRecogizePlateStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
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
|
// LaneIn
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -212,7 +200,7 @@
|
||||||
this.Controls.Add(this.lblLaneLabel);
|
this.Controls.Add(this.lblLaneLabel);
|
||||||
this.Controls.Add(this.grbCardInformation);
|
this.Controls.Add(this.grbCardInformation);
|
||||||
this.Name = "LaneIn";
|
this.Name = "LaneIn";
|
||||||
this.Size = new System.Drawing.Size(460, 710);
|
this.Size = new System.Drawing.Size(460, 764);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).EndInit();
|
||||||
this.grbPlateCamera.ResumeLayout(false);
|
this.grbPlateCamera.ResumeLayout(false);
|
||||||
|
@ -240,6 +228,5 @@
|
||||||
private System.Windows.Forms.Label lblPlateString;
|
private System.Windows.Forms.Label lblPlateString;
|
||||||
private System.Windows.Forms.Label lblCardTime;
|
private System.Windows.Forms.Label lblCardTime;
|
||||||
private System.Windows.Forms.Label lblRecogizePlateStatus;
|
private System.Windows.Forms.Label lblRecogizePlateStatus;
|
||||||
private System.Windows.Forms.Button button1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
using OpenCvSharp;
|
using System;
|
||||||
using OpenCvSharp.Extensions;
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using OpenCvSharp;
|
||||||
|
using OpenCvSharp.Extensions;
|
||||||
|
|
||||||
namespace AIParkingApplication
|
namespace AIParkingApplication
|
||||||
{
|
{
|
||||||
|
@ -11,7 +9,7 @@ namespace AIParkingApplication
|
||||||
{
|
{
|
||||||
private Camera overviewCamera;
|
private Camera overviewCamera;
|
||||||
private Camera plateCamera;
|
private Camera plateCamera;
|
||||||
private PlateDetector squarePlateDetector;
|
private PlateDetector plateDetector;
|
||||||
|
|
||||||
public LaneIn()
|
public LaneIn()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +28,7 @@ namespace AIParkingApplication
|
||||||
overviewCamera.Startcapture();
|
overviewCamera.Startcapture();
|
||||||
plateCamera.Startcapture();
|
plateCamera.Startcapture();
|
||||||
|
|
||||||
squarePlateDetector = new PlateDetector(PlateType.Square, PlateDetectorConstant.MIN_SIZE_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.MAX_SIZE_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.SCALE_FACTOR_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.MIN_NEIGHBORS_DEFAULT_SQUARE_PLATE);
|
plateDetector = new PlateDetector(PlateType.Square, PlateDetectorConstant.MIN_SIZE_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.MAX_SIZE_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.SCALE_FACTOR_DEFAULT_SQUARE_PLATE, PlateDetectorConstant.MIN_NEIGHBORS_DEFAULT_SQUARE_PLATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OverviewCamera_OnOneVideoFrameRequested(Mat videoFrame)
|
private void OverviewCamera_OnOneVideoFrameRequested(Mat videoFrame)
|
||||||
|
@ -44,37 +42,12 @@ namespace AIParkingApplication
|
||||||
|
|
||||||
private void PlateCamera_OnOneVideoFrameRequested(Mat videoFrame)
|
private void PlateCamera_OnOneVideoFrameRequested(Mat videoFrame)
|
||||||
{
|
{
|
||||||
Cv2.Resize(videoFrame, videoFrame, new OpenCvSharp.Size(1280, 720));
|
Cv2.Resize(videoFrame, videoFrame, new Size(1280, 720));
|
||||||
Mat result = squarePlateDetector.DetectPlate(videoFrame);
|
Mat result = plateDetector.DetectPlate(videoFrame);
|
||||||
|
|
||||||
Cv2.Resize(result, result, new OpenCvSharp.Size(272, 272));
|
|
||||||
var response = Util.SendEngineRequestAsync(result, PlateType.Square);
|
|
||||||
|
|
||||||
Bitmap resultPlateImage;
|
|
||||||
OcrResult ocrResult = response.Result;
|
|
||||||
if (!string.IsNullOrEmpty(ocrResult.Ocr) && !string.IsNullOrEmpty(ocrResult.Plate))
|
|
||||||
{
|
|
||||||
var imageData = Convert.FromBase64String(ocrResult.Plate);
|
|
||||||
using (var ms = new MemoryStream(imageData))
|
|
||||||
{
|
|
||||||
resultPlateImage = new Bitmap(ms);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
resultPlateImage = result.ToBitmap();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lblPlateString.Invoke(new Action(() =>
|
|
||||||
{
|
|
||||||
lblPlateString.Text = ocrResult.Ocr;
|
|
||||||
}));
|
|
||||||
|
|
||||||
pictureBoxPlateImage.Invoke(new Action(() =>
|
pictureBoxPlateImage.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
pictureBoxPlateImage.Image?.Dispose();
|
pictureBoxPlateImage.Image?.Dispose();
|
||||||
pictureBoxPlateImage.Image = resultPlateImage;
|
pictureBoxPlateImage.Image = result.ToBitmap();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,15 +69,10 @@ namespace AIParkingApplication
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CaptureAllCamera()
|
private void CaptureAllCamera(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.plateCamera.RequestCaptureOneFrame();
|
this.plateCamera.RequestCaptureOneFrame();
|
||||||
this.overviewCamera.RequestCaptureOneFrame();
|
this.overviewCamera.RequestCaptureOneFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
CaptureAllCamera();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,49 +117,4 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="pictureBoxPlateImage.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="pictureBoxPlateVideo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="grbPlateCamera.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="pictureBoxOverviewImage.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="pictureBoxOverviewVideo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="grbOverviewCamera.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblLaneLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblCardType.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblCardNumber.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="grbCardInformation.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="button1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblCardTime.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblPlateString.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="lblRecogizePlateStatus.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
</root>
|
199
AIParkingApplication/LaneOut.Designer.cs
generated
199
AIParkingApplication/LaneOut.Designer.cs
generated
|
@ -28,34 +28,50 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.grbPlateRefernce = new System.Windows.Forms.GroupBox();
|
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
|
||||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
|
||||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.grbPlateRefernce = new System.Windows.Forms.GroupBox();
|
||||||
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
this.grbPlateCamera = new System.Windows.Forms.GroupBox();
|
this.grbPlateCamera = new System.Windows.Forms.GroupBox();
|
||||||
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
|
|
||||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
|
||||||
this.lblMoneyAmount = new System.Windows.Forms.Label();
|
|
||||||
this.lblCardType = new System.Windows.Forms.Label();
|
|
||||||
this.grbCardInformation = new System.Windows.Forms.GroupBox();
|
|
||||||
this.lblLaneLabel = new System.Windows.Forms.Label();
|
|
||||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||||
this.grbOverviewCamera = new System.Windows.Forms.GroupBox();
|
this.grbOverviewCamera = new System.Windows.Forms.GroupBox();
|
||||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||||
|
this.lblLaneLabel = new System.Windows.Forms.Label();
|
||||||
this.lblCardNumber = new System.Windows.Forms.Label();
|
this.lblCardNumber = new System.Windows.Forms.Label();
|
||||||
this.grbPlateRefernce.SuspendLayout();
|
this.lblMoneyAmount = new System.Windows.Forms.Label();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
this.lblCardType = new System.Windows.Forms.Label();
|
||||||
|
this.grbCardInformation = new System.Windows.Forms.GroupBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||||
|
this.grbPlateRefernce.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
this.grbPlateCamera.SuspendLayout();
|
this.grbPlateCamera.SuspendLayout();
|
||||||
this.grbCardInformation.SuspendLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||||
this.grbOverviewCamera.SuspendLayout();
|
this.grbOverviewCamera.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
this.grbCardInformation.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
// pictureBox5
|
||||||
|
//
|
||||||
|
this.pictureBox5.Location = new System.Drawing.Point(6, 23);
|
||||||
|
this.pictureBox5.Name = "pictureBox5";
|
||||||
|
this.pictureBox5.Size = new System.Drawing.Size(200, 200);
|
||||||
|
this.pictureBox5.TabIndex = 0;
|
||||||
|
this.pictureBox5.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox6
|
||||||
|
//
|
||||||
|
this.pictureBox6.Location = new System.Drawing.Point(6, 296);
|
||||||
|
this.pictureBox6.Name = "pictureBox6";
|
||||||
|
this.pictureBox6.Size = new System.Drawing.Size(200, 200);
|
||||||
|
this.pictureBox6.TabIndex = 0;
|
||||||
|
this.pictureBox6.TabStop = false;
|
||||||
|
//
|
||||||
// grbPlateRefernce
|
// grbPlateRefernce
|
||||||
//
|
//
|
||||||
this.grbPlateRefernce.Controls.Add(this.pictureBox6);
|
this.grbPlateRefernce.Controls.Add(this.pictureBox6);
|
||||||
|
@ -68,21 +84,13 @@
|
||||||
this.grbPlateRefernce.TabStop = false;
|
this.grbPlateRefernce.TabStop = false;
|
||||||
this.grbPlateRefernce.Text = "THAM CHIẾU BIỂN SỐ VÀO";
|
this.grbPlateRefernce.Text = "THAM CHIẾU BIỂN SỐ VÀO";
|
||||||
//
|
//
|
||||||
// pictureBox6
|
// pictureBox2
|
||||||
//
|
//
|
||||||
this.pictureBox6.Location = new System.Drawing.Point(6, 296);
|
this.pictureBox2.Location = new System.Drawing.Point(6, 23);
|
||||||
this.pictureBox6.Name = "pictureBox6";
|
this.pictureBox2.Name = "pictureBox2";
|
||||||
this.pictureBox6.Size = new System.Drawing.Size(200, 200);
|
this.pictureBox2.Size = new System.Drawing.Size(200, 200);
|
||||||
this.pictureBox6.TabIndex = 0;
|
this.pictureBox2.TabIndex = 0;
|
||||||
this.pictureBox6.TabStop = false;
|
this.pictureBox2.TabStop = false;
|
||||||
//
|
|
||||||
// pictureBox5
|
|
||||||
//
|
|
||||||
this.pictureBox5.Location = new System.Drawing.Point(6, 23);
|
|
||||||
this.pictureBox5.Name = "pictureBox5";
|
|
||||||
this.pictureBox5.Size = new System.Drawing.Size(200, 200);
|
|
||||||
this.pictureBox5.TabIndex = 0;
|
|
||||||
this.pictureBox5.TabStop = false;
|
|
||||||
//
|
//
|
||||||
// pictureBox1
|
// pictureBox1
|
||||||
//
|
//
|
||||||
|
@ -104,6 +112,55 @@
|
||||||
this.grbPlateCamera.TabStop = false;
|
this.grbPlateCamera.TabStop = false;
|
||||||
this.grbPlateCamera.Text = "CAMERA BIỂN SỐ";
|
this.grbPlateCamera.Text = "CAMERA BIỂN SỐ";
|
||||||
//
|
//
|
||||||
|
// pictureBox4
|
||||||
|
//
|
||||||
|
this.pictureBox4.Location = new System.Drawing.Point(6, 24);
|
||||||
|
this.pictureBox4.Name = "pictureBox4";
|
||||||
|
this.pictureBox4.Size = new System.Drawing.Size(200, 200);
|
||||||
|
this.pictureBox4.TabIndex = 0;
|
||||||
|
this.pictureBox4.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox3
|
||||||
|
//
|
||||||
|
this.pictureBox3.Location = new System.Drawing.Point(212, 24);
|
||||||
|
this.pictureBox3.Name = "pictureBox3";
|
||||||
|
this.pictureBox3.Size = new System.Drawing.Size(200, 200);
|
||||||
|
this.pictureBox3.TabIndex = 0;
|
||||||
|
this.pictureBox3.TabStop = false;
|
||||||
|
//
|
||||||
|
// grbOverviewCamera
|
||||||
|
//
|
||||||
|
this.grbOverviewCamera.Controls.Add(this.pictureBox3);
|
||||||
|
this.grbOverviewCamera.Controls.Add(this.pictureBox4);
|
||||||
|
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(15, 443);
|
||||||
|
this.grbOverviewCamera.Name = "grbOverviewCamera";
|
||||||
|
this.grbOverviewCamera.Size = new System.Drawing.Size(424, 238);
|
||||||
|
this.grbOverviewCamera.TabIndex = 6;
|
||||||
|
this.grbOverviewCamera.TabStop = false;
|
||||||
|
this.grbOverviewCamera.Text = "CAMERA TOÀN CẢNH";
|
||||||
|
//
|
||||||
|
// lblLaneLabel
|
||||||
|
//
|
||||||
|
this.lblLaneLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.lblLaneLabel.AutoSize = true;
|
||||||
|
this.lblLaneLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.lblLaneLabel.Location = new System.Drawing.Point(262, 22);
|
||||||
|
this.lblLaneLabel.Name = "lblLaneLabel";
|
||||||
|
this.lblLaneLabel.Size = new System.Drawing.Size(141, 39);
|
||||||
|
this.lblLaneLabel.TabIndex = 5;
|
||||||
|
this.lblLaneLabel.Text = "LÀN RA";
|
||||||
|
//
|
||||||
|
// lblCardNumber
|
||||||
|
//
|
||||||
|
this.lblCardNumber.AutoSize = true;
|
||||||
|
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;
|
||||||
|
this.lblCardNumber.Text = "Số thẻ";
|
||||||
|
//
|
||||||
// lblMoneyAmount
|
// lblMoneyAmount
|
||||||
//
|
//
|
||||||
this.lblMoneyAmount.AutoSize = true;
|
this.lblMoneyAmount.AutoSize = true;
|
||||||
|
@ -135,63 +192,6 @@
|
||||||
this.grbCardInformation.TabStop = false;
|
this.grbCardInformation.TabStop = false;
|
||||||
this.grbCardInformation.Text = "THÔNG TIN THẺ";
|
this.grbCardInformation.Text = "THÔNG TIN THẺ";
|
||||||
//
|
//
|
||||||
// lblLaneLabel
|
|
||||||
//
|
|
||||||
this.lblLaneLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.lblLaneLabel.AutoSize = true;
|
|
||||||
this.lblLaneLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.lblLaneLabel.Location = new System.Drawing.Point(262, 22);
|
|
||||||
this.lblLaneLabel.Name = "lblLaneLabel";
|
|
||||||
this.lblLaneLabel.Size = new System.Drawing.Size(141, 39);
|
|
||||||
this.lblLaneLabel.TabIndex = 5;
|
|
||||||
this.lblLaneLabel.Text = "LÀN RA";
|
|
||||||
//
|
|
||||||
// pictureBox4
|
|
||||||
//
|
|
||||||
this.pictureBox4.Location = new System.Drawing.Point(6, 24);
|
|
||||||
this.pictureBox4.Name = "pictureBox4";
|
|
||||||
this.pictureBox4.Size = new System.Drawing.Size(200, 200);
|
|
||||||
this.pictureBox4.TabIndex = 0;
|
|
||||||
this.pictureBox4.TabStop = false;
|
|
||||||
//
|
|
||||||
// pictureBox3
|
|
||||||
//
|
|
||||||
this.pictureBox3.Location = new System.Drawing.Point(212, 24);
|
|
||||||
this.pictureBox3.Name = "pictureBox3";
|
|
||||||
this.pictureBox3.Size = new System.Drawing.Size(200, 200);
|
|
||||||
this.pictureBox3.TabIndex = 0;
|
|
||||||
this.pictureBox3.TabStop = false;
|
|
||||||
//
|
|
||||||
// grbOverviewCamera
|
|
||||||
//
|
|
||||||
this.grbOverviewCamera.Controls.Add(this.pictureBox3);
|
|
||||||
this.grbOverviewCamera.Controls.Add(this.pictureBox4);
|
|
||||||
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(15, 443);
|
|
||||||
this.grbOverviewCamera.Name = "grbOverviewCamera";
|
|
||||||
this.grbOverviewCamera.Size = new System.Drawing.Size(424, 238);
|
|
||||||
this.grbOverviewCamera.TabIndex = 6;
|
|
||||||
this.grbOverviewCamera.TabStop = false;
|
|
||||||
this.grbOverviewCamera.Text = "CAMERA TOÀN CẢNH";
|
|
||||||
//
|
|
||||||
// pictureBox2
|
|
||||||
//
|
|
||||||
this.pictureBox2.Location = new System.Drawing.Point(6, 23);
|
|
||||||
this.pictureBox2.Name = "pictureBox2";
|
|
||||||
this.pictureBox2.Size = new System.Drawing.Size(200, 200);
|
|
||||||
this.pictureBox2.TabIndex = 0;
|
|
||||||
this.pictureBox2.TabStop = false;
|
|
||||||
//
|
|
||||||
// lblCardNumber
|
|
||||||
//
|
|
||||||
this.lblCardNumber.AutoSize = true;
|
|
||||||
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;
|
|
||||||
this.lblCardNumber.Text = "Số thẻ";
|
|
||||||
//
|
|
||||||
// LaneOut
|
// LaneOut
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -203,38 +203,39 @@
|
||||||
this.Controls.Add(this.grbPlateCamera);
|
this.Controls.Add(this.grbPlateCamera);
|
||||||
this.Name = "LaneOut";
|
this.Name = "LaneOut";
|
||||||
this.Size = new System.Drawing.Size(671, 694);
|
this.Size = new System.Drawing.Size(671, 694);
|
||||||
this.grbPlateRefernce.ResumeLayout(false);
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||||
|
this.grbPlateRefernce.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
this.grbPlateCamera.ResumeLayout(false);
|
this.grbPlateCamera.ResumeLayout(false);
|
||||||
this.grbCardInformation.ResumeLayout(false);
|
|
||||||
this.grbCardInformation.PerformLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||||
this.grbOverviewCamera.ResumeLayout(false);
|
this.grbOverviewCamera.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
this.grbCardInformation.ResumeLayout(false);
|
||||||
|
this.grbCardInformation.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
private System.Windows.Forms.GroupBox grbPlateRefernce;
|
|
||||||
private System.Windows.Forms.PictureBox pictureBox6;
|
private System.ComponentModel.BackgroundWorker backgroundWorker2;
|
||||||
private System.Windows.Forms.PictureBox pictureBox5;
|
private System.Windows.Forms.PictureBox pictureBox5;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox6;
|
||||||
|
private System.Windows.Forms.GroupBox grbPlateRefernce;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox2;
|
||||||
private System.Windows.Forms.PictureBox pictureBox1;
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
private System.Windows.Forms.GroupBox grbPlateCamera;
|
private System.Windows.Forms.GroupBox grbPlateCamera;
|
||||||
private System.Windows.Forms.PictureBox pictureBox2;
|
|
||||||
private System.ComponentModel.BackgroundWorker backgroundWorker2;
|
|
||||||
private System.ComponentModel.BackgroundWorker backgroundWorker1;
|
|
||||||
private System.Windows.Forms.Label lblMoneyAmount;
|
|
||||||
private System.Windows.Forms.Label lblCardType;
|
|
||||||
private System.Windows.Forms.GroupBox grbCardInformation;
|
|
||||||
private System.Windows.Forms.Label lblCardNumber;
|
|
||||||
private System.Windows.Forms.Label lblLaneLabel;
|
|
||||||
private System.Windows.Forms.PictureBox pictureBox4;
|
private System.Windows.Forms.PictureBox pictureBox4;
|
||||||
private System.Windows.Forms.PictureBox pictureBox3;
|
private System.Windows.Forms.PictureBox pictureBox3;
|
||||||
private System.Windows.Forms.GroupBox grbOverviewCamera;
|
private System.Windows.Forms.GroupBox grbOverviewCamera;
|
||||||
|
private System.ComponentModel.BackgroundWorker backgroundWorker1;
|
||||||
|
private System.Windows.Forms.Label lblLaneLabel;
|
||||||
|
private System.Windows.Forms.Label lblCardNumber;
|
||||||
|
private System.Windows.Forms.Label lblMoneyAmount;
|
||||||
|
private System.Windows.Forms.Label lblCardType;
|
||||||
|
private System.Windows.Forms.GroupBox grbCardInformation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using OpenCvSharp;
|
|
||||||
using System;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace AIParkingApplication
|
namespace AIParkingApplication
|
||||||
|
@ -40,61 +34,10 @@ namespace AIParkingApplication
|
||||||
|
|
||||||
return pingTask.Result.Result;
|
return pingTask.Result.Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<OcrResult> SendEngineRequestAsync(Mat plateImage, PlateType plateType)
|
|
||||||
{
|
|
||||||
string plateImageBase64 = Convert.ToBase64String(plateImage.ToBytes());
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (var client = new HttpClient { BaseAddress = new Uri("http://localhost:8080/"), Timeout = TimeSpan.FromMilliseconds(5000) })
|
|
||||||
{
|
|
||||||
var request = new PlateRequestEngineModel
|
|
||||||
{
|
|
||||||
Img64 = plateImageBase64,
|
|
||||||
Mode = plateType == PlateType.Square ? "square" : "long",
|
|
||||||
Display = "full"
|
|
||||||
};
|
|
||||||
HttpResponseMessage response = await client.PostAsJsonAsync("/get-from-frame", request);
|
|
||||||
response.EnsureSuccessStatusCode();
|
|
||||||
var ocrResult = await response.Content.ReadAsAsync<OcrResult>();
|
|
||||||
return ocrResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"SendEngineRequest : {ex.Message}");
|
|
||||||
return new OcrResult();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PlateRequestEngineModel
|
|
||||||
{
|
|
||||||
[JsonProperty("img64")]
|
|
||||||
public string Img64 { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("mode")]
|
|
||||||
public string Mode { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("display")]
|
|
||||||
public string Display { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OcrResult
|
|
||||||
{
|
|
||||||
[JsonProperty("ocr")]
|
|
||||||
public string Ocr { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("plate")]
|
|
||||||
public string Plate { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class UtilConstant
|
public static class UtilConstant
|
||||||
{
|
{
|
||||||
public const int PING_TIMEOUT_MS = 500;
|
public const int PING_TIMEOUT_MS = 500;
|
||||||
|
|
||||||
public const string HTTP_POST_METHOD = "POST";
|
|
||||||
public const string HTTP_POST_CONTENTTYPE = "application/json";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net461" />
|
|
||||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
|
||||||
<package id="OpenCvSharp4" version="4.3.0.20200524" targetFramework="net461" />
|
<package id="OpenCvSharp4" version="4.3.0.20200524" targetFramework="net461" />
|
||||||
<package id="OpenCvSharp4.runtime.win" version="4.3.0.20200524" targetFramework="net461" />
|
<package id="OpenCvSharp4.runtime.win" version="4.3.0.20200524" targetFramework="net461" />
|
||||||
<package id="OpenCvSharp4.Windows" version="4.3.0.20200524" targetFramework="net461" />
|
<package id="OpenCvSharp4.Windows" version="4.3.0.20200524" targetFramework="net461" />
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
packages/Newtonsoft.Json.12.0.3/.signature.p7s
vendored
BIN
packages/Newtonsoft.Json.12.0.3/.signature.p7s
vendored
Binary file not shown.
20
packages/Newtonsoft.Json.12.0.3/LICENSE.md
vendored
20
packages/Newtonsoft.Json.12.0.3/LICENSE.md
vendored
|
@ -1,20 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2007 James Newton-King
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
packages/Newtonsoft.Json.12.0.3/packageIcon.png
vendored
BIN
packages/Newtonsoft.Json.12.0.3/packageIcon.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB |
Loading…
Reference in New Issue
Block a user