An unhandled exception of type 'System.ApplicationException' occurred in SourceAFIS.dll Additional information: Fingerprint image is too small.
MyFingerprint fp = new MyFingerprint(); fp.Filename = filename; // Load image from the file //Console.WriteLine(" Image size = {0} x {1} (width x height)", fp.Image.GetLength(1), fp.Image.GetLength(0)); Console.WriteLine(" Loading image from {0}...", filename); BitmapImage image = new BitmapImage(new Uri(filename, UriKind.RelativeOrAbsolute)); //Console.WriteLine(" Image size = {0} x {1} (width x height)", fp.Image.GetLength(1), fp.Image.GetLength(0)); fp.AsBitmapSource = image; // Above update of fp.AsBitmapSource initialized also raw image in fp.Image // Check raw image dimensions, Y axis is first, X axis is second Console.WriteLine(" Image size = {0} x {1} (width x height)", fp.Image.GetLength(1), fp.Image.GetLength(0)); // Initialize empty person object and set its properties MyPerson person = new MyPerson(); person.Name = name; // Add fingerprint to the person person.Fingerprints.Add(fp); // Execute extraction in order to initialize fp.Template Console.WriteLine(" Extracting template..."); Afis.Extract(person); // Check template size Console.WriteLine(" Template size = {0} bytes", fp.Template.Length); return person; } static void Main(string[] args) { // Initialize SourceAFIS Afis = new AfisEngine(); // Enroll some people List<MyPerson> database = new List<MyPerson>(); database.Add(Enroll("http://localhost:6060/PhpProject2/img/img2.jpg", "Second")); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)