diff --git a/LeatherProject/.vs/LeatherApp/FileContentIndex/2c1c4d22-3d33-45c9-9ef6-e955a5cc697f.vsidx b/LeatherProject/.vs/LeatherApp/FileContentIndex/2c1c4d22-3d33-45c9-9ef6-e955a5cc697f.vsidx new file mode 100644 index 0000000..60c0d7e Binary files /dev/null and b/LeatherProject/.vs/LeatherApp/FileContentIndex/2c1c4d22-3d33-45c9-9ef6-e955a5cc697f.vsidx differ diff --git a/LeatherProject/.vs/LeatherApp/FileContentIndex/dd9ae3d2-46dd-4b3a-b963-37aec66a90f0.vsidx b/LeatherProject/.vs/LeatherApp/FileContentIndex/dd9ae3d2-46dd-4b3a-b963-37aec66a90f0.vsidx deleted file mode 100644 index 4857360..0000000 Binary files a/LeatherProject/.vs/LeatherApp/FileContentIndex/dd9ae3d2-46dd-4b3a-b963-37aec66a90f0.vsidx and /dev/null differ diff --git a/LeatherProject/LeatherApp/Page/FHome.Designer.cs b/LeatherProject/LeatherApp/Page/FHome.Designer.cs index 72409d4..5ce16e1 100644 --- a/LeatherProject/LeatherApp/Page/FHome.Designer.cs +++ b/LeatherProject/LeatherApp/Page/FHome.Designer.cs @@ -58,6 +58,7 @@ this.btnEnd = new Sunny.UI.UISymbolButton(); this.btnStart = new Sunny.UI.UISymbolButton(); this.uiTitlePanel2 = new Sunny.UI.UITitlePanel(); + this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList(); this.lineChartDefect = new Sunny.UI.UILineChart(); this.uiTitlePanel3 = new Sunny.UI.UITitlePanel(); this.uiDataGridView1 = new Sunny.UI.UIDataGridView(); @@ -80,6 +81,7 @@ this.lstboxLog = new Sunny.UI.UIListBox(); this.uiTitlePanel6 = new Sunny.UI.UITitlePanel(); this.uiPanel3 = new Sunny.UI.UIPanel(); + this.picDefectImage = new LeatherApp.UIExtend.UCImageView(); this.pnlScannerImg = new Sunny.UI.UITitlePanel(); this.picScanner2 = new System.Windows.Forms.PictureBox(); this.picScanner1 = new System.Windows.Forms.PictureBox(); @@ -98,8 +100,6 @@ this.uiLabel8 = new Sunny.UI.UILabel(); this.uiLabel7 = new Sunny.UI.UILabel(); this.uiLabel6 = new Sunny.UI.UILabel(); - this.picDefectImage = new LeatherApp.UIExtend.UCImageView(); - this.ucColorListDefect = new LeatherApp.UIExtend.UCColorList(); this.uiPanel1.SuspendLayout(); this.uiTitlePanel1.SuspendLayout(); this.uiPanel2.SuspendLayout(); @@ -448,7 +448,6 @@ this.button1.TabIndex = 1; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; - this.button1.Visible = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // btnPause @@ -633,6 +632,29 @@ this.uiTitlePanel2.TitleColor = System.Drawing.Color.White; this.uiTitlePanel2.TitleForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(29)))), ((int)(((byte)(138))))); // + // ucColorListDefect + // + this.ucColorListDefect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ucColorListDefect.ColorChanged = null; + this.ucColorListDefect.FillColor = System.Drawing.Color.White; + this.ucColorListDefect.FillColor2 = System.Drawing.Color.White; + this.ucColorListDefect.FillDisableColor = System.Drawing.Color.White; + this.ucColorListDefect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucColorListDefect.Location = new System.Drawing.Point(1, 38); + this.ucColorListDefect.MinimumSize = new System.Drawing.Size(1, 1); + this.ucColorListDefect.Name = "ucColorListDefect"; + this.ucColorListDefect.RadiusSides = Sunny.UI.UICornerRadiusSides.None; + this.ucColorListDefect.RectColor = System.Drawing.Color.White; + this.ucColorListDefect.RectDisableColor = System.Drawing.Color.White; + this.ucColorListDefect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom; + this.ucColorListDefect.Size = new System.Drawing.Size(121, 42); + this.ucColorListDefect.Style = Sunny.UI.UIStyle.Custom; + this.ucColorListDefect.StyleCustomMode = true; + this.ucColorListDefect.TabIndex = 1; + this.ucColorListDefect.Text = "ucColorList1"; + this.ucColorListDefect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + // // lineChartDefect // this.lineChartDefect.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -714,7 +736,7 @@ dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(242)))), ((int)(((byte)(238))))); dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; @@ -1039,6 +1061,15 @@ this.uiPanel3.Text = null; this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; // + // picDefectImage + // + this.picDefectImage.Dock = System.Windows.Forms.DockStyle.Fill; + this.picDefectImage.Location = new System.Drawing.Point(0, 0); + this.picDefectImage.Margin = new System.Windows.Forms.Padding(0); + this.picDefectImage.Name = "picDefectImage"; + this.picDefectImage.Size = new System.Drawing.Size(350, 226); + this.picDefectImage.TabIndex = 1; + // // pnlScannerImg // this.pnlScannerImg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -1327,38 +1358,6 @@ this.uiLabel6.Text = "光源"; this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // picDefectImage - // - this.picDefectImage.Dock = System.Windows.Forms.DockStyle.Fill; - this.picDefectImage.Location = new System.Drawing.Point(0, 0); - this.picDefectImage.Margin = new System.Windows.Forms.Padding(0); - this.picDefectImage.Name = "picDefectImage"; - this.picDefectImage.Size = new System.Drawing.Size(350, 226); - this.picDefectImage.TabIndex = 1; - // - // ucColorListDefect - // - this.ucColorListDefect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ucColorListDefect.ColorChanged = null; - this.ucColorListDefect.FillColor = System.Drawing.Color.White; - this.ucColorListDefect.FillColor2 = System.Drawing.Color.White; - this.ucColorListDefect.FillDisableColor = System.Drawing.Color.White; - this.ucColorListDefect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.ucColorListDefect.Location = new System.Drawing.Point(1, 38); - this.ucColorListDefect.MinimumSize = new System.Drawing.Size(1, 1); - this.ucColorListDefect.Name = "ucColorListDefect"; - this.ucColorListDefect.RadiusSides = Sunny.UI.UICornerRadiusSides.None; - this.ucColorListDefect.RectColor = System.Drawing.Color.White; - this.ucColorListDefect.RectDisableColor = System.Drawing.Color.White; - this.ucColorListDefect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom; - this.ucColorListDefect.Size = new System.Drawing.Size(121, 42); - this.ucColorListDefect.Style = Sunny.UI.UIStyle.Custom; - this.ucColorListDefect.StyleCustomMode = true; - this.ucColorListDefect.TabIndex = 1; - this.ucColorListDefect.Text = "ucColorList1"; - this.ucColorListDefect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; - // // FHome // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/LeatherProject/LeatherApp/Page/FHome.cs b/LeatherProject/LeatherApp/Page/FHome.cs index 6e4cb23..2f349aa 100644 --- a/LeatherProject/LeatherApp/Page/FHome.cs +++ b/LeatherProject/LeatherApp/Page/FHome.cs @@ -2195,7 +2195,7 @@ namespace LeatherApp.Page int minWorker, minIOC; ThreadPool.GetMinThreads(out minWorker, out minIOC); ThreadPool.SetMinThreads(25, minIOC); - Mat matt = new Mat("C:\\Users\\fang\\Desktop\\新建文件夹\\287.bmp"); + Mat matt = new Mat("C:\\Users\\fang\\Desktop\\新建文件夹\\253.bmp"); //OpenCVUtil.LoadEdgeMode(); //int tt = 0; @@ -2204,21 +2204,24 @@ namespace LeatherApp.Page List qlist = new List(); + //[ 'laji','liangdian', 'wuyin', 'jietou', 'bmss', 'qipi', 'tiaohen','yayin','zhouyin','yisesi','chongying'] qlist.Add(new QualifiedLimit() { Code = "laji", ZXD = 0.3, Area = 0.04, ContrastLower = 0.98, ContrastTop = 1.02 }); - qlist.Add(new QualifiedLimit() { Code = "wuyin", ZXD = 0.3, Area = 0.09, ContrastLower = 0.93, ContrastTop = 1.07 }); - qlist.Add(new QualifiedLimit() { Code = "jiangyin", ZXD = 0.3, Area = 0.04, ContrastLower = 0.96, ContrastTop = 1.04 }); - qlist.Add(new QualifiedLimit() { Code = "zhouyin", ZXD = 0.3, Area = 0.09, ContrastLower = 0.94, ContrastTop = 1.06 }); - qlist.Add(new QualifiedLimit() { Code = "hengdang", ZXD = 0.3, Area = 0.08, ContrastLower = 0.99, ContrastTop = 1.01 }); - qlist.Add(new QualifiedLimit() { Code = "jietou", ZXD = 0.3, Area = 0.04, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "liangdian", ZXD = 0.3, Area = 0.09, ContrastLower = 0.93, ContrastTop = 1.07 }); + qlist.Add(new QualifiedLimit() { Code = "wuyin", ZXD = 0.3, Area = 0.04, ContrastLower = 0.96, ContrastTop = 1.04 }); + qlist.Add(new QualifiedLimit() { Code = "jietou", ZXD = 0.3, Area = 0.09, ContrastLower = 0.94, ContrastTop = 1.06 }); + qlist.Add(new QualifiedLimit() { Code = "bmss", ZXD = 0.3, Area = 0.08, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "qipi", ZXD = 0.4, Area = 0.01, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "tiaohen", ZXD = 0.3, Area = 2, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "yayin", ZXD = 0.3, Area = 0.05, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "zhouyin", ZXD = 0.3, Area = 2, ContrastLower = 0.99, ContrastTop = 1.01 }); + qlist.Add(new QualifiedLimit() { Code = "yisesi", ZXD = 0.3, Area = 0.05, ContrastLower = 0.99, ContrastTop = 1.01 }); qlist.Add(new QualifiedLimit() { Code = "chongying", ZXD = 0.3, Area = 2, ContrastLower = 0.99, ContrastTop = 1.01 }); - qlist.Add(new QualifiedLimit() { Code = "aokeng", ZXD = 0.3, Area = 0.05, ContrastLower = 0.99, ContrastTop = 1.01 }); - qlist.Add(new QualifiedLimit() { Code = "bmss", ZXD = 0.3, Area = 2, ContrastLower = 0.99, ContrastTop = 1.01 }); DefectLib dlt = new DefectLib(); dlt.start(); dlt.add(new Device.DefectLib.DefectTask() { - modelName = "CYG_0706.trt", + modelName = "MX0727.trt", record = null, bmp = matt, bmpTag = matt.Clone(), diff --git a/LeatherProject/LeatherApp/bin/Debug/models/MX0727.trt b/LeatherProject/LeatherApp/bin/Debug/models/MX0727.trt new file mode 100644 index 0000000..a7974e1 Binary files /dev/null and b/LeatherProject/LeatherApp/bin/Debug/models/MX0727.trt differ diff --git a/LeatherProject/LeatherApp/bin/Debug/models/MX0812.trt b/LeatherProject/LeatherApp/bin/Debug/models/MX0812.trt new file mode 100644 index 0000000..ccf0442 Binary files /dev/null and b/LeatherProject/LeatherApp/bin/Debug/models/MX0812.trt differ