protected override void worker_DoWork(object sender, DoWorkEventArgs e) { try { var fps = new List <Fingerprint>(); uint count = _fourprint.GetSegmentationCount(e.Argument as Image); using (Dermalog.Afis.ImageContainer.Decoder decoder = new Dermalog.Afis.ImageContainer.Decoder()) for (uint i = 0; i < count; i++) { SegmentedFingerprint finger = _fourprint.GetSegmentedFingerprint(i); fps.Add(ProcessImage(finger.Image, finger.ImageData, finger.Position, finger.Hand)); } SetAllFingerLeds(LF10LedColor.OFF); uint[] positions = new uint[fps.Count]; for (int i = 0; i < positions.Length; i++) { positions[i] = fps[i].Position; } SetLeds(fps[0].Hand, positions, LF10LedColor.GREEN); base.InvokeFingerprintsDetected(fps); } catch (Exception ex) { InvokeScannerError(sender, new ScannerErrorEventArgs("Processing error: " + ex.Message, ex)); } }
protected override void worker_DoWork(object sender, DoWorkEventArgs e) { try { var localImage = e.Argument as Image; var fps = new List <Fingerprint>(); uint count = _fourprint.GetSegmentationCount(localImage); for (uint i = 0; i < count; i++) { SegmentedFingerprint finger = _fourprint.GetSegmentedFingerprint(i); if (finger == null) { continue; } localImage = finger.Image.Clone() as Image; Template template = base.Encoder.Encode(localImage); int nQC = DermalogNistQualityCheck.Check(localImage); Fingerprint fp = new Fingerprint(); fp.Image = localImage; fp.Template = template; string templateFormat = Properties.Settings.Default.TemplateFORMAT; fp.Template.Format = Utils.Generate_Template_Encoder(templateFormat); fp.NFIQ = nQC; fp.Hand = finger.Hand; fp.Position = finger.Position; if (template != null) { fps.Add(fp); } } SetAllFingerLeds(ZF10LedColor.OFF); uint[] positions = new uint[fps.Count]; for (int i = 0; i < positions.Length; i++) { positions[i] = fps[i].Position; } SetLeds(fps[0].Hand, positions, ZF10LedColor.GREEN); base.InvokeFingerprintsDetected(fps); } catch (Exception ex) { InvokeScannerError(sender, new ScannerErrorEventArgs("Processing error: " + ex.Message, ex)); } }
protected override void worker_DoWork(object sender, DoWorkEventArgs e) { try { var fps = new List <Fingerprint>(); uint count = _fourprint.GetSegmentationCount(e.Argument as Image); for (uint i = 0; i < count; i++) { SegmentedFingerprint finger = _fourprint.GetSegmentedFingerprint(i); var localImage = finger.Image; Template template = base.Encoder.Encode(localImage); int nQC = DermalogNistQualityCheck.Check(localImage); Fingerprint fp = new Fingerprint(); fp.Image = localImage; fp.Template = template; fp.NFIQ = nQC; fp.Hand = finger.Hand; fp.Position = finger.Position; fps.Add(fp); } SetAllFingerLeds(LF10LedColor.OFF); uint[] positions = new uint[fps.Count]; for (int i = 0; i < positions.Length; i++) { positions[i] = fps[i].Position; } SetLeds(fps[0].Hand, positions, LF10LedColor.GREEN); base.InvokeFingerprintsDetected(fps); } catch (Exception ex) { InvokeScannerError(sender, new ScannerErrorEventArgs("Processing error: " + ex.Message, ex)); } }
protected override void worker_DoWork(object sender, DoWorkEventArgs e) { try { var localImage = e.Argument as Image; var fps = new List <Fingerprint>(); uint count = _fourprint.GetSegmentationCount(localImage); if (count == 0) { InvokeScannerError(sender, new ScannerErrorEventArgs("Processing error: No finger found in the image", null)); return; } for (uint i = 0; i < count; i++) { var finger = _fourprint.GetSegmentedFingerprint(i); fps.Add(ProcessImage(finger.Image, finger.ImageData, finger.Position, finger.Hand)); } SetAllFingerLeds(ZF10LedColor.OFF); uint[] positions = new uint[fps.Count]; for (int i = 0; i < positions.Length; i++) { positions[i] = fps[i].Position; } SetLeds(fps[0].Hand, positions, ZF10LedColor.GREEN); base.InvokeFingerprintsDetected(fps); } catch (Exception ex) { InvokeScannerError(sender, new ScannerErrorEventArgs("Processing error: " + ex.Message, ex)); } }