Esempio n. 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();
            }
        }
Esempio n. 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();
     }
 }
Esempio n. 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();
     }
 }
Esempio n. 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();
        }
Esempio n. 5
0
 public MainForm()
 {
     InitializeComponent();
     MainTitle = "";
     AnalyzeDirector.InitFormsAndShow(this);
 }
Esempio n. 6
0
        // tabLamp
        private void ButtonLamp_Click(object sender, EventArgs e)
        {
            var list = listBoxLamp.SelectedItems.Cast <string>();

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

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