### Initialize AfisEngine Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Create a static instance of the AfisEngine to ensure efficient access throughout the application. ```csharp static AfisEngine Afis = new AfisEngine(); ``` -------------------------------- ### Import SourceAFIS Namespace Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Add the necessary namespace directive to your source file to access SourceAFIS classes. ```csharp using SourceAFIS.Simple; ``` -------------------------------- ### Create Fingerprint Objects Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Initialize Fingerprint objects using different image formats such as WPF BitmapSource, WinForms Bitmap, or raw grayscale data. ```csharp // using .NET 3.0 (WPF) bitmap Fingerprint fp1 = new Fingerprint(); fp1.AsBitmapSource = new BitmapImage(new Uri(pathToImage, UriKind.RelativeOrAbsolute)); // using .NET 2.0 (WinForms) bitmap Fingerprint fp2 = new Fingerprint(); fp2.AsBitmap = new Bitmap(Bitmap.FromFile(pathToImage)); // using raw grayscale image (see API docs for format description) Fingerprint fp3 = new Fingerprint(); fp3.Image = myRawImage; ``` -------------------------------- ### Perform One-to-Many Fingerprint Identification Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Use AfisEngine.Identify to search a collection of candidates for a matching fingerprint. This method is optimized for performance compared to manual LINQ queries. ```csharp Person matchingCandidate = Afis.Identify(probePerson, allCandidates).FirstOrDefault(); bool match = (matchingCandidate != null); ``` ```csharp Person matchingCandidate = (from candidate in allCandidates let score = Afis.Verify(probePerson, candidate) where score >= Afis.Threshold orderby score descending select candidate).FirstOrDefault(); bool match = (matchingCandidate != null); ``` -------------------------------- ### Verify Fingerprint Match Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Compare two Person objects to determine if they match by checking the similarity score returned by the engine. ```csharp float score = Afis.Verify(person1, person2); bool match = (score > 0); ``` -------------------------------- ### Extract Fingerprint Template Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Perform the extraction process to generate a template from the fingerprint image, which is required for matching. ```csharp Afis.Extract(person); ``` -------------------------------- ### Wrap Fingerprint in Person Object Source: https://en.wikibooks.org/wiki/SourceAFIS/Tutorial Add a fingerprint to a Person object to prepare it for template extraction. ```csharp Person person = new Person(); person.Fingerprints.Add(fp); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.