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!"); } }
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!"); } }
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); }
private void ThreadProcess(IrisImage iris) { iris.ProcessIris(); Thread.CurrentThread.Abort(); }
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; }
private void ThreadProcess(IrisImage iris) { iris.ProcessIris(); Thread.CurrentThread.Abort(); }