Esempio n. 1
0
        public FingerTemplate Deserialize(String type, String data)
        {
            FingerTemplate result = null;

            if (type == TemplateTypes.IBTemplate.ToString())
            {
                result = new TemplateIB(Convert.FromBase64String(data));
            }
            return(result);
        }
Esempio n. 2
0
        public FingerTemplate Deserialize(int type, byte[] data)
        {
            FingerTemplate result = null;

            if (type == TemplateTypes.IBTemplate)
            {
                result = new TemplateIB(data);
            }
            return(result);
        }
Esempio n. 3
0
        public int Match(FingerTemplate template, IEnumerable <FingerTemplate> candidates, out List <FingerTemplate> matches)
        {
            byte[] pFp = new byte[BioNetACSDLL._GetFeatSize()];

            var        resultList = new List <FingerTemplate>();
            TemplateIB templateIB = template as TemplateIB;

            matches = new List <FingerTemplate>();

            foreach (var candidate in candidates.OfType <TemplateIB>())
            {
                int compareResult = BioNetACSDLL._CompareFt9052vs9052(candidate.enrollment, templateIB.enrollment);
                if (compareResult > 0)
                {
                    matches.Add(candidate);
                }
            }

            return(matches.Count);
        }