示例#1
0
        public int MatchIdkit(string randomRoute, string route1, string route2, string database, string path = "")
        {
            IDKit.InitWithLicense(_idkitLibLicense);
            var connection = new Innovatrics.IDKit.Connection();

            IDKit.SetParameter(ConfigParameter.CfgResolutionDpi, _cfgDpi);
            IDKit.SetParameter(ConfigParameter.CfgSimilarityThreshold, 1);
            IDKit.GetUserLimit();
            connection.Connect(database);
            var user = IDKit.InitUser();

            IDKit.AddFingerprintFromFile(user, FingerPosition.LeftIndex, randomRoute);
            IDKit.AddFingerprintFromFile(user, FingerPosition.RightIndex, route1);
            var userId = connection.RegisterUser(user);

            IDKit.ClearUser(user);
            IDKit.AddFingerprintFromFile(user, FingerPosition.Unknown, route2);

            var matchResult = connection.MatchFingerprint(user, 0, userId);
            var result      = matchResult.Score;

            user = connection.GetUser(userId);
            IDKit.GetFingerPosition(user, matchResult.Index);
            IDKit.SaveFingerprintImage(user, matchResult.Index, ImageFormat.Bmp, path + "found.bpm");
            IDKit.FreeUser(user);
            connection.Close();
            IDKit.TerminateModule();
            return(result);
        }
示例#2
0
        private void frmTestInnovatrics_Load(object sender, EventArgs e)
        {
            try
            {
                NomeDigitais = new SortedList <string, Byte[]>();

                Futronic.Device.onInfo       += info => txtOut.Text += "\r\n" + info;
                Futronic.Device.onInfoAppend += extra => txtOut.Text += extra;
                Futronic.Device.onError      += erro => ShowError(erro);

                fbd.SelectedPath = txtPath.Text;
                LoadFiles();

                idKit       = new IDKit();
                txtOut.Text = IDKit.ProductString + " Threshold: " + idKit.Threshold;
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
        }