Пример #1
0
 public bool enroll(IrisImage irisImage, string name)
 {
     try
     {
         irisImage.ProcessIris();
     }
     catch(Exception e)
     {
         //throw new Exception("Processing Error. Iris Rejected.");
     }
     try
     {
         IrisDBEntry Entry = new IrisDBEntry();
         Entry.id = Guid.NewGuid();
         Entry.name = name;
         Entry.InputImage = irisImage.InputImage;
         Entry.IrisCode = irisImage.Iris.FullIrisCode;
         DB.Insert(Entry);
         return true;
     }
     catch (Exception e)
     {
         throw new Exception("Database Error!");
     }
 }
Пример #2
0
 public bool enroll(IrisImage irisImage, string name)
 {
     try
     {
         irisImage.ProcessIris();
     }
     catch (Exception e)
     {
         //throw new Exception("Processing Error. Iris Rejected.");
     }
     try
     {
         IrisDBEntry Entry = new IrisDBEntry();
         Entry.id         = Guid.NewGuid();
         Entry.name       = name;
         Entry.InputImage = irisImage.InputImage;
         Entry.IrisCode   = irisImage.Iris.FullIrisCode;
         DB.Insert(Entry);
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception("Database Error!");
     }
 }
Пример #3
0
        public IrisDBEntry Match(IrisImage FirstImage)
        {
            FirstImage.ProcessIris();
            int count = DB.Count();
            List <IrisDBEntry> Entries;

            for (int i = 0; i < count; i += Math.Min(6, count - i))
            {
                Entries = DB.Select();
                foreach (var entry in Entries)
                {
                    bool result;
                    //Thread MatchThread = new Thread(() => { result = MatchThread(FirstImage.Iris.FullIrisCode, entry.IrisCode); });
                    result = Match(FirstImage.Iris.FullIrisCode, entry.IrisCode);
                    if (result)
                    {
                        return(entry);
                    }
                }
            }
            return(null);
        }
Пример #4
0
 private void ThreadProcess(IrisImage iris)
 {
     iris.ProcessIris();
     Thread.CurrentThread.Abort();
 }
Пример #5
0
 public IrisDBEntry Match(IrisImage FirstImage)
 {
     FirstImage.ProcessIris();
     int count = DB.Count();
     List<IrisDBEntry> Entries;
     for (int i = 0; i < count; i += Math.Min(6, count - i))
     {
         Entries = DB.Select();
         foreach (var entry in Entries)
         {
             bool result;
             //Thread MatchThread = new Thread(() => { result = MatchThread(FirstImage.Iris.FullIrisCode, entry.IrisCode); });
             result = Match(FirstImage.Iris.FullIrisCode, entry.IrisCode);
             if (result)
             {
                 return entry;
             }
         }
     }
     return null;
 }
Пример #6
0
 private void ThreadProcess(IrisImage iris)
 {
     iris.ProcessIris();
     Thread.CurrentThread.Abort();
 }