コード例 #1
0
        public Training()
        {
            InitializeComponent();
            TooMany.Hide();
            RemainingImages.Hide();
            PicLabel.Hide();
            Start.Enabled = false;
            Stop.Enabled  = false;
            Save.Enabled  = false;

            Client.Connect();
            if (Client.Request("start") == "ERROR")
            {
                MessageBox.Show("El servidor no responde.");
                Application.Exit();
            }

            try {
                FaceDetected = new HaarCascade("haarcascade_frontalface_default.xml");
            } catch (Exception e) {
                MessageBox.Show(e.Message);
                Application.Exit();
            }

            Camera            = new Capture();
            Application.Idle += new EventHandler(DisplayFrame);
        }
コード例 #2
0
 void StopTraining()
 {
     Processing    = false;
     Start.Enabled = true;
     Stop.Enabled  = false;
     Save.Enabled  = true;
     RemainingImages.Hide();
     PicLabel.Hide();
 }