Example #1
0
        private void buttonSet_Click(object sender, EventArgs e)
        {
            row         = int.Parse(textBoxRow.Text);
            col         = int.Parse(textBoxCol.Text);
            rowPitch    = double.Parse(textBoxRowPitch.Text);
            colPitch    = double.Parse(textBoxColPitch.Text);
            BlobThres   = this.BlobBar.Value;
            BlobMinArea = int.Parse(TextBoxMinArea.Text);
            BlobMaxArea = int.Parse(TextBoxMaxArea.Text);

            BlobWhiteBlob = CheckBoxWhiteBlob.Checked;

            VSTest.Vision_MarkClean();
            VSTest.Vision_ShowRect(BlobSearchRect, VSBase.COLOR_BLUE, 2);
        }
Example #2
0
 private void comboBoxROI_SelectedIndexChanged(object sender, EventArgs e)
 {
     selectedROI = (CamCDIRoiName)Enum.Parse(typeof(CamCDIRoiName), comboBoxROI.Text);
     Cst.Struct_Image temp = VSGlobalControl.m_VParam.Im[(int)selectedROI];
     numericUpDownIgnoreWidth1.Value   = (decimal)temp.EdgeMultiplePoint.IgnoreLength1;
     numericUpDownIgnoreWidth2.Value   = (decimal)temp.EdgeMultiplePoint.IgnoreLength2;
     numericUpDownSampleNum.Value      = (decimal)temp.EdgeMultiplePoint.Robust.RobustSampleNum;
     numericUpDownMaxRobustCount.Value = (decimal)temp.EdgeMultiplePoint.Robust.MaxRobustCount;
     selectBoxPrint.Checked            = VSGlobalControl.m_VParam.Im[(int)selectedROI].EdgeMultiplePoint.PrintMultiplePoint;
     VSGlobalControl.CleanAllTestMark(false);
     VSTest.Vision_ShowRect(VSGlobalControl.m_VParam.Im[(int)selectedROI].EdgeMultiplePoint.Rect, VSBase.COLOR_YELLOW, Cst.ViewLWidth25);
     if (VisionControl.IsXLine(temp.EdgeMultiplePoint.Dir))
     {
         labelIgnoreWidth1.Text = "左边";
         labelIgnoreWidth2.Text = "右边";
     }
     else
     {
         labelIgnoreWidth1.Text = "上边";
         labelIgnoreWidth2.Text = "下边";
     }
 }