隐藏Led框
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Camera
|
|||||||
this.toolStripNumericUpDown5 = new ToolStripNumericUpDown();
|
this.toolStripNumericUpDown5 = new ToolStripNumericUpDown();
|
||||||
this.toolStripLabel6 = new System.Windows.Forms.ToolStripLabel();
|
this.toolStripLabel6 = new System.Windows.Forms.ToolStripLabel();
|
||||||
this.toolStripNumericUpDown6 = new ToolStripNumericUpDown();
|
this.toolStripNumericUpDown6 = new ToolStripNumericUpDown();
|
||||||
|
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
||||||
this.toolStripNumericUpDown1 = new ToolStripNumericUpDown();
|
this.toolStripNumericUpDown1 = new ToolStripNumericUpDown();
|
||||||
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
|
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
|
||||||
@@ -216,7 +217,8 @@ namespace Camera
|
|||||||
this.toolStripLabel5,
|
this.toolStripLabel5,
|
||||||
this.toolStripNumericUpDown5,
|
this.toolStripNumericUpDown5,
|
||||||
this.toolStripLabel6,
|
this.toolStripLabel6,
|
||||||
this.toolStripNumericUpDown6});
|
this.toolStripNumericUpDown6,
|
||||||
|
this.toolStripButton5});
|
||||||
this.toolStrip3.Name = "toolStrip3";
|
this.toolStrip3.Name = "toolStrip3";
|
||||||
this.toolStrip3.Size = new System.Drawing.Size(559, 30);
|
this.toolStrip3.Size = new System.Drawing.Size(559, 30);
|
||||||
this.toolStrip3.TabIndex = 2;
|
this.toolStrip3.TabIndex = 2;
|
||||||
@@ -309,6 +311,15 @@ namespace Camera
|
|||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
//
|
//
|
||||||
|
// toolStripButton5
|
||||||
|
//
|
||||||
|
this.toolStripButton5.Checked = true;
|
||||||
|
this.toolStripButton5.CheckOnClick = true;
|
||||||
|
this.toolStripButton5.Name = "toolStripButton5";
|
||||||
|
this.toolStripButton5.Size = new System.Drawing.Size(100, 27);
|
||||||
|
this.toolStripButton5.Text = "显示Led框";
|
||||||
|
this.toolStripButton5.Click += new System.EventHandler(this.ToolStripButton5_Click);
|
||||||
|
//
|
||||||
// toolStripLabel7
|
// toolStripLabel7
|
||||||
//
|
//
|
||||||
this.toolStripLabel7.Name = "toolStripLabel7";
|
this.toolStripLabel7.Name = "toolStripLabel7";
|
||||||
@@ -733,6 +744,7 @@ namespace Camera
|
|||||||
private System.Windows.Forms.ToolStripLabel toolStripLabel11;
|
private System.Windows.Forms.ToolStripLabel toolStripLabel11;
|
||||||
private ToolStripNumericUpDown toolStripNumericUpDown11;
|
private ToolStripNumericUpDown toolStripNumericUpDown11;
|
||||||
private ToolStripNumericUpDown toolStripNumericUpDown12;
|
private ToolStripNumericUpDown toolStripNumericUpDown12;
|
||||||
|
private System.Windows.Forms.ToolStripButton toolStripButton5;
|
||||||
private System.Windows.Forms.DataGridView dataGridView1;
|
private System.Windows.Forms.DataGridView dataGridView1;
|
||||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||||
private System.Windows.Forms.DataGridView dataGridView2;
|
private System.Windows.Forms.DataGridView dataGridView2;
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ namespace Camera
|
|||||||
private bool _isEditingLedZone = false;
|
private bool _isEditingLedZone = false;
|
||||||
private bool _isDrawingLedMode = false;
|
private bool _isDrawingLedMode = false;
|
||||||
private int _ledZoneState = 0;
|
private int _ledZoneState = 0;
|
||||||
|
private bool _showLedZones = true;
|
||||||
private Color _detectionZoneColor = Color.Black;
|
private Color _detectionZoneColor = Color.Black;
|
||||||
private ConcurrentDictionary<int, Color> _ledZoneColors = new ConcurrentDictionary<int, Color>();
|
private ConcurrentDictionary<int, Color> _ledZoneColors = new ConcurrentDictionary<int, Color>();
|
||||||
private ConcurrentDictionary<int, string> _ledZoneDetectionResults = new ConcurrentDictionary<int, string>();
|
private ConcurrentDictionary<int, string> _ledZoneDetectionResults = new ConcurrentDictionary<int, string>();
|
||||||
@@ -381,6 +382,7 @@ namespace Camera
|
|||||||
var hsvValues = _camera.GetLedZoneHsvValues();
|
var hsvValues = _camera.GetLedZoneHsvValues();
|
||||||
foreach (var kvp in allLedZones)
|
foreach (var kvp in allLedZones)
|
||||||
{
|
{
|
||||||
|
if (!_showLedZones) continue;
|
||||||
int index = kvp.Key;
|
int index = kvp.Key;
|
||||||
Rectangle ledZone = kvp.Value;
|
Rectangle ledZone = kvp.Value;
|
||||||
Color ledColor = _camera.GetLedZoneColor(index);
|
Color ledColor = _camera.GetLedZoneColor(index);
|
||||||
@@ -1705,6 +1707,13 @@ namespace Camera
|
|||||||
_camera.SetLedDetectorParams(brightLimit, satLimit);
|
_camera.SetLedDetectorParams(brightLimit, satLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 显示Led框复选框事件
|
||||||
|
private void ToolStripButton5_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_showLedZones = toolStripButton5.Checked;
|
||||||
|
picBoxCamera.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
// 红绿蓝阈值事件
|
// 红绿蓝阈值事件
|
||||||
private void ToolStripNumericUpDown7_ValueChanged(object sender, EventArgs e)
|
private void ToolStripNumericUpDown7_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user