更新
This commit is contained in:
@ -497,7 +497,7 @@ namespace HisenceYoloDetection
|
||||
int IfXZeros = melsecPLCTCPDriver.ReadInt("102");
|
||||
int IfYZeros = melsecPLCTCPDriver.ReadInt("112");
|
||||
int IfZZeros = melsecPLCTCPDriver.ReadInt("122");
|
||||
if (IfXZeros <= 40 && IfYZeros <= 140 && IfZZeros <= 40)
|
||||
if (IfXZeros <= 140 && IfYZeros <= 140 && IfZZeros <= 140)
|
||||
{
|
||||
StartDecBtn.Enabled = true;
|
||||
break;
|
||||
@ -519,15 +519,15 @@ namespace HisenceYoloDetection
|
||||
/// <summary>
|
||||
/// ȫͼϴ<CDBC>»<EFBFBD> <20>ü<EFBFBD>֮<EFBFBD><D6AE> OCRʶ<52><CAB6><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>
|
||||
/// </summary>
|
||||
/// <param name="currentMatC"></param>
|
||||
/// <param name="cam1TwoML"></param>
|
||||
/// <param name="strMatListList"></param>
|
||||
/// <param name="currentMatC">ȫͼͼƬ</param>
|
||||
/// <param name="cam1TwoML">ȫ<EFBFBD><EFBFBD>ͼƬ<EFBFBD>ϵ<EFBFBD>Ŀ<EFBFBD>궨λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>ο<EFBFBD><EFBFBD><EFBFBD></param>
|
||||
/// <param name="strMatListList"><EFBFBD><EFBFBD><EFBFBD>صĶ<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD></param>
|
||||
private void InsertSqlRunData(ref Mat currentMatC, MLResult cam1TwoML, ref List<string> strMatListList, ref PaddleOcrModel IOcrModel)
|
||||
{
|
||||
|
||||
|
||||
|
||||
#if false
|
||||
#if true
|
||||
try
|
||||
{
|
||||
List<Mat> mats = new List<Mat>();
|
||||
@ -900,6 +900,11 @@ namespace HisenceYoloDetection
|
||||
|
||||
myLog("<22><>һ<EFBFBD>βɼ<CEB2>ͼ<EFBFBD><CDBC>", DateTime.Now);
|
||||
//<2F>ƶ<EFBFBD>ģ<EFBFBD><C4A3> <20><><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ <20><><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ǰ<EFBFBD>ƶ<EFBFBD>
|
||||
MoveToP(8974, 0, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
List<int> DisList = new List<int>();
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
@ -911,9 +916,12 @@ namespace HisenceYoloDetection
|
||||
// <20><><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3>ֵ<EFBFBD><D6B5>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
||||
double average = DisList.Average();
|
||||
double disreal = average * (-0.54054) + 1324.3232;
|
||||
|
||||
|
||||
MoveToP(8974, 0, (int)(disreal));
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><D7BC><EFBFBD><EFBFBD>=Ҫ<>ƶ<EFBFBD><C6B6>ľ<EFBFBD><C4BE><EFBFBD>
|
||||
double dismove = disreal - 876;
|
||||
if(dismove>0&& dismove<4000)
|
||||
{
|
||||
MoveToP(8974, 0, (int)(dismove));
|
||||
}
|
||||
Thread.Sleep(500);
|
||||
Cam1.SnapshotCount = 0;
|
||||
Cam1.Snapshot();
|
||||
@ -925,8 +933,7 @@ namespace HisenceYoloDetection
|
||||
// MoveToP(xKNow.MoveTwoX, xKNow.MoveTwoY, xKNow.MoveTwoZ);
|
||||
//}
|
||||
// currentXP = 54964;
|
||||
MoveToP(54964, 0, (int)(disreal));
|
||||
//Thread.Sleep(3000);
|
||||
MoveToP(54964, 0, (int)(dismove));
|
||||
Cam1.Snapshot();
|
||||
MoveToP(8974, 0, 0);
|
||||
//if (xKNow != null)
|
||||
@ -999,7 +1006,7 @@ namespace HisenceYoloDetection
|
||||
{
|
||||
// Mat mat = Cv2.ImRead("F:\\<5C><><EFBFBD><EFBFBD>ϴ<EFBFBD>»<EFBFBD>\\cam1\\2024517161641.jpg");
|
||||
Cam1ImgOne = cameraMat;
|
||||
IfCam2Triger = true;
|
||||
IfCam1OneTriger = true;
|
||||
originMatShow.Image = cameraMat.ToBitmap();
|
||||
//pictureBox1.Image = cameraMat.ToBitmap();
|
||||
|
||||
@ -1035,9 +1042,7 @@ namespace HisenceYoloDetection
|
||||
{
|
||||
Directory.CreateDirectory(fitImageFolder);
|
||||
}
|
||||
//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (SnapshotCount == 1)
|
||||
{
|
||||
|
||||
// Mat mat = Cv2.ImRead("F:\\<5C><><EFBFBD><EFBFBD>ϴ<EFBFBD>»<EFBFBD>\\cam1\\2024517161641.jpg");
|
||||
Cam2ImgShowBar = cameraMat;
|
||||
IfCam2Triger = true;
|
||||
@ -1045,7 +1050,7 @@ namespace HisenceYoloDetection
|
||||
//pictureBox1.Image = cameraMat.ToBitmap();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
pictureBox2.Image = cameraMat.ToBitmap();
|
||||
|
Reference in New Issue
Block a user