예제 #1
0
        private void PictureBox_MouseClick(object sender, MouseEventArgs e)
        {
            bool needAllUpdate = false;

            if (!AnalyzeDirector.Loaded)
            {
                return;
            }

            if (AnalyzeDirector.Analized)
            {
                if (!AnalyzeDirector.AskPurgeMotionData())
                {
                    return;
                }
            }

            Point      p    = GetImagePos(e.X, e.Y);
            Parameters para = AnalyzeDirector.Parameters;

            if (radioButtonRaw.Checked)
            {
                if (e.Button == MouseButtons.Left)
                {
                    if (para.Ruler.Count == 2)
                    {
                        para.Ruler.Clear();
                    }
                    para.Ruler.Add(p);
                }
                else if (e.Button == MouseButtons.Right)
                {
                    para.TargetColor = pictureBoxIpl.ImageIpl.At <Vec3b>(p.Y, p.X);
                    needAllUpdate    = true;
                }
            }
            else if (radioButtonRange.Checked)
            {
                if (e.Button == MouseButtons.Left)
                {
                    para.Range.Add(p);
                }
                else if (e.Button == MouseButtons.Right)
                {
                    para.Range.Clear();
                }
            }
            if (needAllUpdate)
            {
                AnalyzeDirector.UpdateAllControll();
            }
            else
            {
                UpdateCtrl();
            }
        }
예제 #2
0
 // tabGraph
 private void GraphCtrlValueChanged(object sender, EventArgs e)
 {
     if (AnalyzeDirector.Loaded)
     {
         AnalyzeDirector.Parameters.StoroboStep  = (int)numericUpDownStorobo.Value;
         AnalyzeDirector.Parameters.LSWindow     = (double)numericUpDownWindow.Value;
         AnalyzeDirector.Parameters.XaxisAngle   = (int)numericUpDownXaxis.Value;
         AnalyzeDirector.Parameters.ReverseYaxis = checkBoxRevYaxis.Checked;
         AnalyzeDirector.UpdateAllControll();
     }
 }
예제 #3
0
 // tabCondision
 private void CondisionCtrlValueChanged(object sender, EventArgs e)
 {
     if (AnalyzeDirector.Loaded)
     {
         AnalyzeDirector.Parameters.Thresh      = (int)numericBinary.Value;
         AnalyzeDirector.Parameters.Shape       = (Parameters.TargetShape)comboBoxShape.SelectedValue;
         AnalyzeDirector.Parameters.DetectAngle = checkBoxAngle.Checked;
         checkBoxAngle.Enabled = (Parameters.TargetShape)comboBoxShape.SelectedValue != Parameters.TargetShape.Circle;
         AnalyzeDirector.UpdateAllControll();
     }
 }
예제 #4
0
        private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
        {
            var tab = (AnalyzeDirector.TabMode)tabControl.SelectedTab.Tag;

            if (AnalyzeDirector.Analized && tab == AnalyzeDirector.TabMode.Condition)
            {
                if (!AnalyzeDirector.AskPurgeMotionData())
                {
                    tabControl.SelectedTab = tabPageGraph;
                    tab = AnalyzeDirector.TabMode.Graph;
                }
            }

            AnalyzeDirector.Tab = tab;
            AnalyzeDirector.UpdateAllControll();
        }
예제 #5
0
 public MainForm()
 {
     InitializeComponent();
     MainTitle = "";
     AnalyzeDirector.InitFormsAndShow(this);
 }
예제 #6
0
        // tabLamp
        private void ButtonLamp_Click(object sender, EventArgs e)
        {
            var list = listBoxLamp.SelectedItems.Cast <string>();

            AnalyzeDirector.LampAnalyze(list);
        }
예제 #7
0
 private void ButtonAggregate_Click(object sender, EventArgs e)
 {
     AnalyzeDirector.SaveAggregateData();
 }
예제 #8
0
        // tabAggerage
        private void ListBoxAggregate_SelectedIndexChanged(object sender, EventArgs e)
        {
            var list = listBoxAggregate.SelectedItems.Cast <string>();

            AnalyzeDirector.AggregateListChanged(list);
        }
예제 #9
0
 private void ButtonAnalyze_Click(object sender, EventArgs e)
 {
     AnalyzeDirector.AnalyzeAllFrames();
 }
예제 #10
0
 private void ButtonEFrame_Click(object sender, EventArgs e)
 {
     AnalyzeDirector.Parameters.EndFrame = AnalyzeDirector.VideoImaging.PosFrames;
     AnalyzeDirector.UpdateAllControll();
 }
예제 #11
0
 // tabView
 private void ButtonLoad_Click(object sender, EventArgs e)
 {
     AnalyzeDirector.LoadVideoFile(listView.SelectedItems[0].Name);
 }