• 大小: 1.07MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-30
  • 语言: 其他
  • 标签: 指纹识别  

资源简介

指纹识别的demo及源码,包括文档

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Linq.expressions;
using System.Windows.Media.Imaging;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using SourceAFIS.Simple; // import namespace SourceAFIS.Simple

namespace Sample
{
    class Program
    {
        // Inherit from Fingerprint in order to add Filename field
        [Serializable]
        class MyFingerprint : Fingerprint
        {
            public string Filename;
        }

        // Inherit from Person in order to add Name field
        [Serializable]
        class MyPerson : Person
        {
            public string Name;
        }

        // Initialize path to images
        static readonly string ImagePath = Path.Combine(Path.Combine(“..“ “..“) “images“);

        // Shared AfisEngine instance (cannot be shared between different threads though)
        static AfisEngine Afis;

        // Take fingerprint image file and create Person object from the image
        static MyPerson Enroll(string filename string name)
        {
            Console.WriteLine(“Enrolling {0}...“ name);

            // Initialize empty fingerprint object and set properties
            MyFingerprint fp = new MyFingerprint();
            fp.Filename = filename;
            // Load image from the file
            Console.WriteLine(“ Loading image from {0}...“ filename);
            BitmapImage image = new BitmapImage(new Uri(filename UriKind.RelativeOrAbsolute));
            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 database = new List();
            database.Add(Enroll(Path.Combine(ImagePath “candidate1.tif“) “Fred Flintstone“));
            database.Add(Enroll(Path.Combine(ImagePath “candidate2.tif“) “Wilma Flintstone“));
            database.Add(Enroll(Path.Combine(ImagePath “candidate3.tif“) “Barney Rubbl

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Bin\
     文件       11264  2012-09-29 04:47  SourceAFIS-1.7.0\Bin\DatabaseAnalyzer.exe
     文件         159  2010-09-13 02:07  SourceAFIS-1.7.0\Bin\DatabaseAnalyzer.exe.config
     文件        2369  2012-01-13 02:29  SourceAFIS-1.7.0\Bin\DatabaseAnalyzerConfiguration.xml
     文件      118272  2012-09-28 05:58  SourceAFIS-1.7.0\Bin\SourceAFIS.dll
     文件       43008  2012-09-29 04:47  SourceAFIS-1.7.0\Bin\SourceAFIS.FingerprintAnalysis.exe
     文件       64430  2012-09-29 04:48  SourceAFIS-1.7.0\Bin\sourceafis.jar
     文件      120320  2012-09-28 05:40  SourceAFIS-1.7.0\Bin\SourceAFIS.Mono.dll
     文件       35655  2012-09-28 05:40  SourceAFIS-1.7.0\Bin\SourceAFIS.Mono.xml
     文件       60928  2012-09-29 04:47  SourceAFIS-1.7.0\Bin\SourceAFIS.Tuning.dll
     文件       58368  2012-09-29 04:47  SourceAFIS-1.7.0\Bin\SourceAFIS.Visualization.dll
     文件       37351  2012-09-28 05:58  SourceAFIS-1.7.0\Bin\SourceAFIS.xml
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\
     文件         998  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\allclasses-frame.html
     文件         918  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\allclasses-noframe.html
     文件        4009  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\constant-values.html
     文件       16424  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\index-all.html
     文件        1256  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\index.html
     文件          19  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\package-list
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\resources\
     文件          57  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\resources\inherit.gif
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\
     目录           0  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\
     文件       33768  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\AfisEngine.html
     文件       25309  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\Finger.html
     文件       32234  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\Fingerprint.html
     文件        1260  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\package-frame.html
     文件        5597  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\package-summary.html
     文件       20950  2012-09-29 04:48  SourceAFIS-1.7.0\Documentation\javadoc\sourceafis\simple\Person.html
............此处省略176个文件信息

评论

共有 条评论