Beispiel #1
0
        public static void SaveTemplate(double[,] image, string fileName)
        {
            var minutiae = MinutiaeExtractor.GetBiolabMinutiae(image);

            object template = BioLab.Biometrics.Mcc.Sdk.MccSdk.CreateMccTemplate(image.GetLength(1), image.GetLength(0), 500, minutiae.ToArray());

            MccSdk.SaveMccTemplateToTextFile(template, Constants.pathToTemplatesDb + fileName + "_t");
        }
Beispiel #2
0
 private static object GetTemplate(string fileName)
 {
     //if this template exist alredy
     if (File.Exists(Constants.pathToTemplatesDb + fileName + "_t"))
     {
         return(MccSdk.LoadMccTemplateFromTextFile(Constants.pathToTemplatesDb + fileName + "_t"));
     }
     else
     {
         var    image    = ImageHelper.LoadImage(Constants.PathToDb + fileName);
         var    minutiae = MinutiaeExtractor.GetBiolabMinutiae(image);
         object template = MccSdk.CreateMccTemplate(image.GetLength(1), image.GetLength(0), 500, minutiae.ToArray());
         MccSdk.SaveMccTemplateToTextFile(template, Constants.pathToTemplatesDb + fileName + "_t");
         return(template);
     }
 }