Example #1
0
        public void Train(UserInformationInXmlFiles xml)
        {
            int[] labels;

            xml.GetTrainingSet(out _trainingSet, out labels, out _namesList);

            Train();
        }
Example #2
0
        public FaceRecognitionLogin()
        {
            _capture = new VideoCapture();

            List <string> nicknames;
            List <Image <Gray, byte> > trainingSet;

            int[] labels;

            UserInformationInXmlFiles xml = new UserInformationInXmlFiles(new DirectoryInfo(Application.StartupPath).Parent.Parent.FullName + "\\UserInformation\\", 5);

            xml.GetTrainingSet(out trainingSet, out labels, out nicknames);

            faceRecognition = new EigenFaceRecognition(new DirectoryInfo(Application.StartupPath).Parent.Parent.FullName +
                                                       "\\UserInformation\\haarcascade_frontalface_alt2.xml",
                                                       trainingSet, nicknames, Constants.FaceImagesPerUser);


            InitializeComponent();
        }