指纹图像太小 [英] Fingerprint image is too small

查看:92
本文介绍了指纹图像太小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.net框架中使用SourceAFIS进行指纹验证。当我从桌面上拍摄图像时,它工作正常。但是当我从我的localhost服务器使用相同的图像时,我无法加载图像,并且注册功能中显示以下错误:

I am using SourceAFIS for fingerprint verification in .net framework. When i take an image form my desktop, it works fine. But when i use the same image form my localhost server, i cannot load the image and the following error is shown inside 'Enroll' function:

An unhandled exception of type 'System.ApplicationException' occurred in SourceAFIS.dll Additional information: Fingerprint image is too small.





这是我的代码:



here is my code:

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"));
    }





您能告诉我如何解决这个问题吗?



我尝试过:



尝试从我的localhost服务器上传图片。



Would you please tell me how to solve the issue?

What I have tried:

Trying to upload image from my localhost server.

推荐答案

呃......我会说你正在使用的图像太小了。去图。



我看到的第一个问题是你使用JPG作为注册图像。别。 JPG使用有损压缩并引入可能会使图像无法使用的文物。



第二个问题可能是因为图像不是很高足够的分辨率(太小了,就像错误说的那样。)



我不知道你在使用什么,也不熟悉你正在使用的库。联系制作它的人员的限制和要求。
Uhhh....I would say that the image that you're using is too small. Go figure.

The first problem I see is that you're using a JPG as an enroll image. DON'T. JPG's use lossy compression and introduce artifacts that can screw up the image to the point of being unusable.

The second problem is probably because the image isn't of a high enough resolution. (Too small, like the error says.)

I have no idea what you're using and am not familiar with the library you're using. Contact the people who made it for it's limitations and requirements.


这篇关于指纹图像太小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆