Пример #1
0
        private void ProcessingBT_Click(object sender, EventArgs e)
        {
            //  camera1 = new Process(cap1, bgImage1, pictureBox1, pictureBox2, pictureBox3, track_window_mean1);
            //  process1 = new Thread(new ThreadStart(camera1.run));
            //  process1.Name = "camera1";
            // // process1.Start();
            ////  Process.START = true;
            //  camera2 = new Process(cap2, bgImage2, pictureBox4, pictureBox5, pictureBox6, track_window_mean2);
            //  process2 = new Thread(new ThreadStart(camera2.run));
            //  process2.Name = "camera2";
            // // process2.Start();


            camera[0]       = new CamProcess(cap[0], bgImage[0], pictureBox1, pictureBox4, null, track_window_mean1, "TRACK", 0);
            process[0]      = new Thread(new ThreadStart(camera[0].run));
            process[0].Name = "camera1";
            process[0].Start();

            camera[1]       = new CamProcess(cap[1], bgImage[1], pictureBox2, pictureBox5, null, track_window_mean1, "BGSUB", 1);
            process[1]      = new Thread(new ThreadStart(camera[1].run));
            process[1].Name = "camera2";
            process[1].Start();

            camera[2]       = new CamProcess(cap[2], bgImage[2], pictureBox3, pictureBox6, null, track_window_mean1, "BGSUB", 2);
            process[2]      = new Thread(new ThreadStart(camera[2].run));
            process[2].Name = "camera3";
            process[2].Start();


            //Manager manager = new Manager(cam1, cam2, null);
            //Thread managerthread = new Thread(new ThreadStart(manager.run));
            //managerthread.Name = "manager";
            //managerthread.Start();


            // Process.START = true;
        }
 public Manager(CamProcess cam1, CamProcess cam2, CamProcess cam3)
 {
     this.cam[0] = cam1;
     this.cam[1] = cam2;
     //this.cam[2] = cam3;
 }