Example #1
0
        private async void simpleButton1_Click(object sender, EventArgs e)
        {
            await Task.Run(() =>
            {
                for (int i = 0; i < 10; i++)
                {
                    if (!recognition.SaveTrainingData(pictureBox2.Image, txtFaceName.Text))
                    {
                        MessageBox.Show("Hata", "Profil alınırken beklenmeyen bir hata oluştu.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    Thread.Sleep(100);
                    lblEgitilenAdet.Text = (i + 1) + " adet profil.";
                }


                recognition = null;
                train       = null;

                recognition = new BusinessRecognition("D:\\", "Faces", "yuz.xml");
                train       = new Classifier_Train("D:\\", "Faces", "yuz.xml");
            });
        }