Fingerprint Sdk 2009

March 22, 2018 | Author: Franklin Jimenez | Category: Component Object Model, Java (Programming Language), Windows Xp, Microsoft Windows, Library (Computing)


Comments



Description

Fingerprint SDK 2009 Developer's Manualhttp://www.griaulebiometrics.com/page/pt-br/book/export/html/361 Fingerprint SDK 2009 Developer's Manual Fingerprint SDK 2009 Developer's Manual Griaule Biometrics © 2009 Griaule Biometrics Fingerprint SDK and GrFinger are trademarks of Griaule Biometrics LTDA. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Manual Conventions Icons Definitions and Acronyms Icons The icons below indicate that a section applies to a specific integration type: DLL, ActiveX or Java application/applet. This icon indicates that the section applies to Fingerprint SDK DLL only. This icon indicates that the section applies to Fingerprint SDK ActiveX component only. This icon indicates that the section applies to Fingerprint SDK Java for Windows only. The icons below are used to get reader's attention to any important information. This icon usually gives hints to make something easier: learning, understanding, programming, deploying, etc. This icon is used to indicate a very important section that should not be skipped. This icon indicates a potential risk to system integrity, a risk of malfunctioning, etc. The section must not be skipped and you should read it carefully. Definitions and Acronyms IDE - An Integrated Development Environment (IDE) is a software that assists programmers to develop software. It normally consists of a source code editor, a compiler and/or interpreter, build-automation tools, and (usually) a debugger. The Fingerprint SDK ActiveX Component can be used in many IDEs, like Microsoft Visual Studio and Borland Delphi. DLL - A Dynamic Link Library (DLL) is a shared library used in Microsoft Windows. A single instance of a shared library can be used by many running programs without being replicated for each program, saving RAM and disk space. The Fingerprint SDK library can be used as a Windows DLL. SDK - A Software Development Kit (SDK) is a set of development tools, documents, libraries and/or sample codes that allows a programmer to create applications for a certain software package. The Fingerprint SDK allows a programmer to create applications with biometric capabilities. FRR - The False Rejection Rate (FRR) is defined as the percentage of identification instances in which false rejection occurs. It's normally expressed as a probability. FAR - The False Acceptance Rate (FAR) is the measure of the likelihood that the biometric security system will incorrectly accept an access attempt by an unauthorized user. DPI - The Dots per Inch (DPI) measure indicates the resolution of images. The more dots per inch, the higher the resolution. The DPI is an important information about fingerprint images, affecting both the image quality and matching accuracy. Template - A template is the feature set extracted from a fingerprint image. The verification and identification functions in Fingerprint SDK library works only with templates. Once the template is extracted the library doesn't need the fingerprint image anymore for any verification or identification process. Callback - The callback scheme is used in event-driven programs where the program registers a function (a "callback handler") to handle a certain event. The program does not call the handler directly: when the event 1 of 63 3/4/2009 14:33 Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 occurs, another program or library or even the operating system calls the handler, passing it arguments which describe the event. ActiveX - This is the Microsoft specification for reusable components. ActiveX is based on the Component Object Model (COM), an open standard that specifies how components interact and interoperate. Somewhat like a DLL, ActiveX allows packaging code to create highly reusable components. regsvr32 - This is a tool to register and unregister Object Linking and Embedding (OLE) controls, such as DLLs and ActiveX controls. For further info about this tool, check the Microsoft's regsvr32 page. JNI - The Java Native Interface (JNI) is a programming framework that allows Java code running in the Java Virtual Machine (JVM) to call and be called by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages, such as C, C++ and assembly. Java applet - A Java applet is a Java program that can be included as part of a web page. Getting Started Fingerprint SDK is a fingerprint recognition library that comes packaged with a Software Development Kit (SDK), allowing you to integrate biometrics in a wide range of applications. Thanks to its support for several programming languages, richness of code samples, and its thorough documentation, you'll start developing your application in a matter of minutes. Quick Start Guide Features What's New on Fingerprint SDK About Fingerprint SDK Editions Upgrading from GrFinger 4.2 to Fingerprint SDK FingerCap USB Driver Licensing Support Quick Start Guide Downloading Download a trial version of Fingerprint SDK at www.griaule.com, in "Downloads" section. Installing To install Fingerprint SDK, run the installation program and follow the on-screen instructions. Installing your fingerprint reader Check the Fingerprint Readers Installation section in this manual. Folders Overview Check the SDK Folders Structure section in this manual. Getting licenses Check the Licensing section in this manual. Developing using Fingerprint SDK A good starting point is copying and modifying the SDK samples. The first step to start developing with Fingerprint SDK is choosing between Fingerprint SDK DLL, ActiveX or Java. All formats have the same functionalities, so choose the most appropriate for your needs, programming environment and skills. Next, check this manual and the sample codes to learn what you need to build your application. Deploying a Fingerprint SDK based application Check the Deploying a Fingerprint SDK Based Application section in this manual. Features Technical Characteristics Fingerprint Readers Support Programming Languages Support Sample Codes Quality One-to-many Identification Licensing Technical Characteristics Capture Detects fingerprint readers plug/unplug; Automatic finger detection; Supports BMP files for fingerprint image saving/loading; Maximum image size of 1280 x 1280 pixels; Minimum image size of 50 x 50 pixels; Maximum resolution of 1000 DPI; Minimum resolution of 125 DPI; Extraction Average extraction time of 100ms*; Maximum image size of 500 x 500 pixels**; Minimum image size of 50 x 50 pixels; Average template size of 400 bytes*; Matching 2 of 63 3/4/2009 14:33 Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 Identification speed (IDENTIFICATION EDITION): up to 35000/s*** Identification speed (VERIFICATION EDITION): up to 100/s* *** Verification speed (IDENTIFICATION EDITION): up to 100/s* *** Verification speed (VERIFICATION EDITION): up to 100/s* *** Notes: * Images of 300 x 300 pixels. Machine: Pentium4 2.8GHz 512MB. ** Larger images are cropped. *** Images of 100 x 100 pixels. Machine: Pentium4 2.8GHz 512MB. Fingerprint Readers Support Usually the SDKs provided by the fingerprint readers manufacturers support only their own devices. The support for multiple readers in Fingerprint SDK allows you to choose the more suitable reader for your needs. It also makes the deployment of such devices easier and assures that you will be able to choose the one that fits your customer's needs even after your application deployment. Supported Fingerprint Readers Microsoft Fingerprint Reader Microsoft Wireless IntelliMouse Explorer with Fingerprint Reader Microsoft Optical Desktop with Fingerprint Reader DigitalPersona U.Are.U 4000 DigitalPersona U.Are.U 4000B Testech Bio-I CYTE Secugen Hamster III M2SYS M2-S Fingerprint Reader Biotouch / Futronic FS80 Nitgen Hamster I / Hamster II Certis Image Orcanthus Crossmatch V250 / V300 / V300 LC / V300 LC2 / V500 Fingerprint SDK multiple readers support allows using on a single machine, and at the same time, one Crossmatch device, up to 127 Testech devices, one Secugen device or one Nitgen device, one Certis device, up to 127 M2SYS devices, up to 127 Futronic devices, up to 127 DigitalPersona devices and up to 127 Microsoft devices. Programming Languages Support Most SDKs provide a cumbersome DLL as their unique interface, needing you to create import files for the language you're using, among other obstacles. Fingerprint SDK supports multiple programming languages, including Java (Windows only), Delphi, Visual Basic 6, C++, C++.NET, C#, VB.NET, VBA and Visual FoxPro 8. ActiveX, DLL and Java components are available for Windows platform. Sample Codes The Fingerprint SDK comes packaged with fifteen detailed and complete application samples, along with their source code, in several programming languages. The samples cover all Fingerprint SDK functions and provide an easy starting point for development. Quality Griaule's fingerprint recognition algorithm was successfully tested among the world's best fingerprint recognition systems, on a test held by the United States National Institute of Standards and Technology (NIST) in 2003. The Griaule fingerprint recognition algorithms (P066) get the first position of the average ERR in FVC 2006. The FVC (Fingerprint Verification Competition) is the world’s largest competition for fingerprint verification algorithms. One-to-many Identification Most solutions offer only one-to-one verification or one-to-little identification. Fingerprint SDK is capable of making unlimited one-to-many identification. Licensing Fingerprint SDK offers a number of licensing options to meet your needs. Please visit Griaule Web Site to know about it. What's New on Fingerprint SDK Added support to Microsoft Fingerprint Reader version 2.0 (PID 0x00CA) directly on fingercap driver; Added support to Biotouch / Futronic FS80 directly on fingercap; Added support to Nitgen Hamster I / Hamster II; Added support to Certis Image Orcanthus; Added support to Microsoft Wireless IntelliMouse Explorer with Fingerprint Reader directly on fingercap; Added support to Certis Image Orcanthus; Added support to Microsoft Optical Desktop with Fingerprint Reader directly on fingercap; Added support to M2SYS M2-S Fingerprint Reader directly on fingercap; Added support of Bio-i Cyte directly on fingercap; Improved support for all fingerprint readers; Added plugins to all supported fingerprint readers; Dropped support for Windows NT / 98 / Me; Fixed some minor bugs from GrFinger 4.2; Improved robustness; Dropped the banner added to the fingerprint images displayed when runnning trial license; Added splash screen when initializing the library using trial license; Dropped the editions FULL and LIGHT. And added the editions IDENTIFICATION and VERIFICATION. About Fingerprint SDK Editions Fingerprint SDK is available in two editions: VERIFICATION and IDENTIFICATION. The difference between them is just the matching speed, as presented in the Technical Characteristics section. Upgrading from GrFinger 4.2 to Fingerprint SDK SDK upgrade Contact Griaule to get a license upgrade and instructions on how to apply the new license; Uninstall GrFinger 4.2 SDK; Install Fingerprint SDK. Upgrading already deployed applications Contact Griaule to get a license upgrade and instructions on how to apply the new license; Remove all binary files from GrFinger 4.2; Follow the instructions on Deploying a Fingerprint SDK Based Application section to deploy the new binary and license files. 3 of 63 3/4/2009 14:33 * Note that after 90 days the library still works normally.2 works on the following operating systems: Windows Vista Windows Server 2003 Windows XP Professional Windows XP Home Edition Windows XP Media Center Edition Windows XP Tablet PC Edition Windows 2000 (Service Pack 2 or later recommended) Each fingerprint reader is supported on specifics operating systems.NET 2003 and Visual Studio . make sure it can import and use ActiveX components. After this period you have to buy a license to keep using it. you just have to proper replace the trial license with the commercial one.com/page/pt-br/book/export/html/361 If Microsoft.2 supports the following fingerprint readers: Microsoft Fingerprint Reader DigitalPersona U. check the manufacturer's website or the fingerprint reader's documentation. but using it without a commercial license will be an explicit violation of the license agreement. Please check it at Griaule Web Site. There is no technical limitation: the only difference is the splash screen displayed when the library is initializing. you must remove the manufacturer's device driver and install the FingerCap USB Driver. Trial license limitations The trial licenses of Fingerprint SDK are for non-commercial use.Fingerprint SDK 2009 Developer's Manual http://www. If you are intending to use Fingerprint SDK in an IDE other than those listed above. Check the Griaule Web Site for licensing options. For further information check Fingerprint Readers compatible with Griaule FingerCap USB Driver installation section. Visual Studio . To use the commercial license there is no need to reinstall the SDK. check the Licensing Fingerprint SDK Based Deployed Applications section.griaulebiometrics. Delphi 6.Are. You also need to check the supported operating systems and the computer requirements for the fingerprint reader you're intending to use. SDK Folders Structure After installing Fingerprint SDK the following folders will be available in the SDK root folder: Directory Description 4 of 63 3/4/2009 14:33 . pricing and instructions on how to request commercial licenses.NET 2005. Support Griaule Support Page Installing the SDK Supported Systems and Requirements Supported IDEs SDK Folders Structure About the Samples Fingerprint Readers Installation Supported Systems and Requirements These are the operating systems supported by Fingerprint SDK: Windows Vista Windows Server 2003 Windows XP Professional Windows XP Home Edition Windows XP Media Center Edition Windows XP Tablet PC Edition Windows 2000 (Service Pack 2 or later recommended) The hardware requirements are a 200Mhz or higher Pentium-class Processor and 64Mb of RAM. To know how to apply and deploy licenses. It does works with the most used Windows IDEs: Visual Basic 6.U 4000B Bio-I Cyte Biotouch / Futronic FS80 Microsoft Wireless IntelliMouse Explorer with Fingerprint Reader Microsoft Optical Desktop with Fingerprint Reader M2SYS M2-S The FingerCap USB Driver 1. DigitalPersona. It replaces completely the manufacturer's device driver or application. Futronic FS80. M2SYS M2-S or Bio-I Cyte fingerprint readers are used.U 4000 DigitalPersona U. The FingerCap USB Driver 1. FingerCap USB Driver The FingerCap USB Driver is the new device driver used by Fingerprint SDK for some USB fingerprint readers. Visual FoxPro 8. Licensing Fingerprint SDK is distributed with a trial license valid for 90 days*. Delphi 7. Supported IDEs Fingerprint SDK ActiveX component should be supported by any IDE that supports ActiveX components. In order to do so.Are. simplifying the application installation and deployment. . Fingerprint SDK Java: Fingerprint SDK for Windows JavaDoc. initializes and finalizes the sample. their directions and segments. and also support routines.U 4000 DigitalPersona U. but the samples resize all images to the same size before displaying them.Are. To load a fingerprint image saved in BMP format. To clear the log box. e. To delete all the fingerprints enrolled in the database.. GrFingerX.. select the option "Load from file." in the "Image" menu. use the "Clear log" button. clicking the "Verify" button will perform a verification. a library to access Fingerprint SDK in your C++ and C++. doc The Fingerprint SDK documentation files. finger and image callbacks). the last acquired fingerprint image is analyzed and its minutiae and segments are identified. In the latter case the sample will ask you the fingerprint ID you want to verify. handle events. Fingerprint SDK Developer's Manual ENUS. extracted and displayed on screen. Selecting the "Options. a sample source code follows the structure below: File name pattern Description "Main" The main window.. the fingerprint rotation tolerance and also the colors used to display the fingerprint minutiae.. Fingerprint SDK Applet Installer: Fingerprint SDK applet helper for Windows JavaDoc.Fingerprint SDK 2009 Developer's Manual http://www.dll (DLL). Samples Internal Organization Whenever possible.dll (JNI for Windows).griaulebiometrics. fingerprint enrollment. "Util" Methods responsible for initializing and finalizing the Fingerprint SDK library. "Callbacks" (DLL only) The three callbacks handlers used by Fingerprint SDK (status. the sample will try to automatically identify the fingerprint. In the "bin" folder of each programming language folder you will find the sample executable file.com/page/pt-br/book/export/html/361 Directory Description bin Contains all the files needed by Fingerprint SDK library. verification. the result will be shown in the log box. when a reader is plugged or unplugged. The box on the bottom of the window shows status messages. "Options" The options window.. waiting the image being acquired and clicking the "Identify" button will perform an identification. like adding messages to the log box or checking if a fingerprint template is valid.dll (ActiveX) and GrFingerJava. By clicking the "Extract template" button. which displays the fingerprint images. This folder contains (among others): GrFinger. Fingerprint Readers Installation Supported fingerprint readers: Microsoft Fingerprint Reader DigitalPersona U.g. In this window it's possible to change the identification and verification thresholds. samples Contains the samples source codes and binaries. performing the basic biometric operations like identification. The samples are all similar. etc. To save the currently displayed fingerprint image to a file.NET applications. The sample main window seems like the one below: The largest box shows the last fingerprint acquired from a fingerprint reader or loaded from a file. a finger is placed over a reader.lib. About the Samples How to Use the Samples Samples Internal Organization How to Use the Samples The Fingerprint SDK contains a sample biometric application in many programming languages. click the "Clear database" button. "DB" Methods responsible for adding and retrieving data from database." in the "Image" menu.chm: This manual. Each reader scans images in a specific size (width and height). images Some fingerprint images for testing purposes (mainly playing with the samples without having to install a fingerprint reader). include Import files for some of the supported languages (DLL only). Placing a finger already enrolled in the database over the reader. By checking the "Auto identify" option. and the ID of the enrolled template is displayed in the log box. select the option "Save. The "Enroll" button saves the last extracted template into the database. whenever a finger is placed over the reader.Are. lib GrFinger." menu causes a new window to be opened. In both cases the result will be displayed in the log box. etc.U 4000B Bio-I Cyte Biotouch / Futronic FS80 Microsoft Wireless IntelliMouse Explorer with Fingerprint Reader Microsoft Optical Desktop with Fingerprint Reader M2SYS M2-S 5 of 63 3/4/2009 14:33 . 3. add to your project the import file corresponding to the programming language you're using. Go to Project -> Components. 6 of 63 3/4/2009 14:33 .NET are available in the "include" folder in the SDK root folder.Fingerprint SDK 2009 Developer's Manual http://www. This section contains detailed importing instructions for the following IDEs: Microsoft Visual Basic 6 Microsoft Visual Studio 2003/2005 Delphi 6/7 Microsoft Visual FoxPro 8 Microsoft Visual Basic 6 1. Advertisement Banner and Encrypted Images Deploying a Fingerprint SDK Based Application Fingerprint SDK DLL Prerequisites In order to use Fingerprint SDK DLL.. The Fingerprint SDK ActiveX component will be added to the Toolbox.. Import files for Delphi. 2. C++ and C++. Fingerprint SDK ActiveX Prerequisites In order to use Fingerprint SDK ActiveX it must be first imported into the IDE you're using.. Select the GrFingerX Control Library component.griaulebiometrics.com/page/pt-br/book/export/html/361 Secugen Hamster III Nitgen Hamster I .Hamster II Crossmatch Fingerprint Readers Certis Image Orcanthus Fingerprint Readers Installation Using the SDK Fingerprint SDK DLL Prerequisites Fingerprint SDK ActiveX Prerequisites Fingerprint SDK Java for Windows Prerequisites Fingerprint SDK Based Applications Overview Fingerprint Image Format Color Coding Format Contexts Thresholds and Rotation Tolerance Splash Screen. Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.. The Fingerprint SDK ActiveX component will appear in the Toolbox. (VS 2005).. 3.. unhide the tab). In the COM Components tab. select the GrFingerXCtrl Class component... 2. 4. (VS 2003) or Choose Items. 7 of 63 3/4/2009 14:33 .com/page/pt-br/book/export/html/361 Microsoft Visual Studio 2003/2005 1. Right click on a clear area in the tab and select option Add/Remove Items.. Select the Components group of the Toolbox side tab (if necessary. Delphi 6/7 1. Go to Component -> Import ActiveX Control.. 5. Select the GrFingerX Control Library in the component list and click the Install. 3..griaulebiometrics. 3. If a dialog box asks to install the package. click Yes. The Fingerprint SDK ActiveX component will be added to the form. 4. 8 of 63 3/4/2009 14:33 . 2.com/page/pt-br/book/export/html/361 2. Click the OK button. button. just close the project. Select the GrFingerXCtrl Class component.. Insert an ActiveX Control (OleControl) in a form. The Fingerprint SDK ActiveX component will be added to the Component Palette. Microsoft Visual FoxPro 8 1. Don't modify it. A project with the Fingerprint SDK ActiveX library will be opened.Fingerprint SDK 2009 Developer's Manual http://www. init(): Called when the applet initializes. Only after this operation an applet may load and initialize Fingerprint SDK library.finalize(). the GrFingerAppletInstaller class. public void init() { //Execute a job on the event-dispatching thread: //creating this applet's GUI. Copy all required Fingerprint SDK libraries to the client computer running the applet.html is a good starting point for Java applets. start(): Called when the applet is started. Copy the Fingerprint SDK license to the client computer running the applet. start. To sign an applet it's necessary to package it in a JAR file and then sign this file with a trusted certificate. stop. 9 of 63 3/4/2009 14:33 . An applet using Fingerprint SDK must copy all necessary files to the client computer in the init method. Sun's Java Applet Tutorial at http:// java. try { javax. Thus. Signing an Applet The Java Virtual Machine security policy doesn't allow ordinary applets to write data to the filesystem or load libraries.copyAndExtractZip().finalize().copyLicense("mylicense. Applets that must perform such operations must be signed. // Finalize installer.java. removing copied files installer. In order to make it easier to met the second and third requisites. // Install license installer.zip").Fingerprint SDK 2009 Developer's Manual http://www. Finalizing GrFinger and removing the copied files using the methods provided by the GrFingerAppletInstaller class is also straightforward: // Finalize GrFinger library grFinger. Applet Prerequisites Fingerprint SDK is a native Windows library. The ZIP package and license file must be located in the root folder of the JAR archive.txt").init. // Install libraries installer.swing.jar package contains all the required classes for using Fingerprint SDK Java for Windows. Another way to grant permissions for writing data to filesystem and loading libraries in a development environment is editing the user's . copying the files and creating a GrFinger object is straightforward: // Create the installer GrFingerAppletInstaller installer = new GrFingerAppletInstaller("". 3. thus Java programs using Fingerprint SDK only run on Windows.com/page/pt-br/book/export/html/361 Fingerprint SDK Java for Windows Prerequisites The GrFingerJava. but the web-browsers don't invoke any applet milestone method from this thread. initializing GrFinger. Finally. An applet has four abstract milestone methods: init. } } If the applet is Swing based. start. Fingerprint SDK library must be finalized in the destroy method.griaulebiometrics. copying files to the filesystem. Swing components should be created.SwingUtilities. The GrFingerAppletInstaller class handles two resources: a ZIP file (containing the libraries) and a license file.should use the SwingUtilities method invokeAndWait (or invokeLater if appropriate) so that code that refers to the Swing components is executed in the event-dispatching thread.println("Initialization failed!").com/ docs/ books/ tutorial/ applet/ index.err.getGrFinger(). that has methods to perform all the necessary operations: unpacking ZIP files. removing the copied files. Applets and Fingerprint SDK Overview An applet is a class inherited from class JApplet (Swing based) or from class Applet (AWT based). 2. stop(): Called when the applet is stopped. the Fingerprint SDK also contains a helper. three more requisites must be met: 1. // Create GrFinger object GrFinger grFinger = installer. } catch (Exception e) { System. queried and manipulated in the event-dispatching thread."libraries. destroy(): Called when the applet is destroyed. Applet Prerequisites In order to use Fingerprint SDK in Java applets for Windows. stop and destroy. the milestone methods .sun.policy file before loading the applet. Sign the applet to grant permissions for copying files and loading libraries.invokeAndWait(new Runnable() { public void run() { //Initialization code goes here } }). you must initialize and finalize Fingerprint SDK library in the invokeAndWait method. Note in the example below the method invokeAndWait in the init method. and destroy . This procedure isn't recommended for production environments. Using the methods provided by the class. The array is arranged in left to right. it accepts encrypted images as input for backward compatibility purposes. If the user doesn't trust the signed applet. But.Fingerprint SDK 2009 Developer's Manual http://www. or. 16777215 (decimal) or FFFFFF (hex) means white ( ). Most biometric applications are interactive and don't execute more than one biometric operation at a time. Creating a new context for each operation that will be executed simultaneously guarantees the thread safety. firing the corresponding plugging event: the "File" sensor.jar. the image capture may be started on the fingerprint reader. using the generated file keyFile as the keystore: jarsigner -keystore keyFile -storepass storepassword -keypass keypassword -signedjar SignedJarFile. blue x 65536 + green x 256 + red. Fingerprint capture overview Once the capture module is initialized. Although Fingerprint SDK doesn't encrypt the fingerprint images.jar. a message box appears displaying the signature details and asking the user if the applet should be trusted. Fingerprint SDK Based Applications Overview Like any biometric application. To do so you must have the Java SDK installed. The command "keytool --help" shows the program usage. 0 (decimal) or 000000 (hex) means black ( ). Contexts Contexts are an advanced feature used to: allow two or more biometric operations to be executed at the same time.assuming such reader is capturing images . using just the default context. There's no padding. When a signed applet is loaded on a web-browser.the corresponding event is fired. To do so. 10 of 63 3/4/2009 14:33 . 65280 (decimal) or 00FF00 (hex) means pure green( ). use the program jarsigner.com/page/pt-br/book/export/html/361 In a development environment. when the finger is removed from the fingerprint reader. each identification must be executed on its own context. a special sensor is automatically plugged. Fingerprint Image Format The fingerprint image format used in the Fingerprint SDK library is an array of width * height unsigned bytes.1 FREE and LIGHT versions. to perform two fingerprint identifications simultaneously on a multithreaded server. To create a self-signed key you may do: keytool -genkey -alias signFiles -keystore keyFile -keypass keypassword -dname "cn=Distinguished Name" -storepass storepassword The command above will generate a file named keyFile containing a certificate suitable to sign an applet. a Fingerprint SDK based application has four basic steps: initializing the Fingerprint SDK library. When the capture module is initialized. each line immediately follows the previous one. Two operations must not be called simultaneously in the same context because they are not guaranteed to be thread-safe.jar JarFile. Whenever a finger is placed over a fingerprint reader . choosing among enrolling a template or matching it against others on database. Usually the "capturing/extracting/enrolling or matching" steps are repeated until the application is finished. for example. extracting a template for each image.509 certificates. but signed. create different ready-to-use identification or verification environments. Once the fingerprint image is captured. If the applet uses Fingerprint SDK. start capturing images from a fingerprint reader or loading them from files. the special permissions will not be granted. Color Coding Format The color coding format used by the Fingerprint SDK library is the BGR 24-bits format. Finally. Enabling image capture on this special sensor is required in order to load fingerprint images from picture files. a corresponding event is fired. such permission denial will cause the library to fail during its initialization. In case of a plugging event. 16711680 (decimal) or FF0000 (hex) means pure blue ( ). which is the same JarFile. top to bottom order.griaulebiometrics. Some examples: 255 (decimal) or 0000FF (hex) means pure red ( ). Each pixel has a grayscale value ranging from 0 (pure black) to 255 (pure white). This must be done for every JAR package needing special permissions that is used by the applet. the fingerprint images captured from the fingerprint readers couldn't be used for any other purpose because they were encrypted. The keytool program is used for managing X. Each color channel has 256 levels (0 to 255) and the color is coded as the integer number composed by the three channels values in the strict order blue-green-red (most significant byte to least significant byte).jar signFiles The command above will generate the file SignedJarFile. Each byte represents a single pixel of the image. a new event is fired. On GrFinger 4. creating self-signed certificates is an easy way to sign applets. the corresponding event is also fired. This format does not store information about the resolution or size (width and height) of the image. whenever a supported fingerprint reader is plugged or unplugged into the computer. dll Important notes 11 of 63 3/4/2009 14:33 .dll Example If an application uses Fingerprint SDK ActiveX component and supports the Nitgen Hamster I and Microsoft fingerprint readers. any fingerprint matching is then performed in a context corresponding to the right security level. the following files must also be added to the JAR package: GrFingerAppletInstaller. two contexts. using the regsvr32 tool.dll The following files must be packaged with all Fingerprint SDK based applications supporting the Crossmatch fingerprint readers: CapPluginCrossMatch.dll The following files must be packaged with Fingerprint SDK ActiveX based applications: GrFingerX.dll pthreadVC2.dll (must also be registered in the target computer with the regsvr32 tool) CapPluginFingercap. This value is valid in both clockwise and counter-clockwise directions.jar For any applet using the applet helper. so the maximum value that can be set is 180.1 encrypted images. The default value is 45 for the identification process and 25 for the verification process. making it possible to create different identification or verification environments.dll The following files must be packaged with all Fingerprint SDK based applications supporting the Certis Image Orcanthus fingerprint reader: CapPluginCertis. The fingerprint reader installation procedure on any machine where the application will be installed is the same as described in the Fingerprint Readers Installation section.dll pthreadVC2.dll NBioBSP. ensuring a 1% FRR. Advertisement Banner and Encrypted Images Fingerprint SDK doesn't have any splash screen nor advertisement banner nor encrypt the fingerprint images.jar license agreement (your valid Fingerprint SDK integrator or enterprise license agreement) Fingerprint reader support The following files must be packaged with all Fingerprint SDK based applications supporting the Fingerprint Readers compatible with Griaule FingerCap USB Driver: CapPluginFingercap. the following files must be packaged with it: GrFinger. check the Microsoft's regsvr32 page. Required Fingerprint SDK Files Libraries The following files must be packaged with all Fingerprint SDK based applications: GrFinger. may be created.dll Furthermore. The following files must be packaged with Fingerprint SDK Java for Windows based applications: GrFingerJava. GrFingerX. Fingerprint SDK works with GrFinger 4. The threshold is the minimum score needed to state that two fingerprints do match. For example. For backward compatibility purposes.dll NBioBSP.dll must be registered on system during application installation.dll CertisExports. each context has its own matching parameters. each one with the appropriate matching parameters.dll GrFingerX. However. instead of tightening or lowering the matching parameters depending on the security level before performing a matching. a splash screen is shown when the library initializes. Splash Screen. The rotation tolerance defines the maximum acceptable angle variation (in degrees) between two fingerprints being compared that will result in a match.dll The following files must be packaged with all Fingerprint SDK based applications supporting the Secugen Hamster III / Nitgen Hamster I / Hamster II fingerprint readers: CapPluginHamster.dll GrFingerJava.dll CapPluginHamster. Thresholds and Rotation Tolerance The identification and verification functions in Fingerprint SDK library are governed by two important parameters: threshold and rotation tolerance. For further info about this tool.griaulebiometrics. as shown in the picture below. no matter which edition is being used.dll Id3BiokeyDll.Fingerprint SDK 2009 Developer's Manual http://www. in a two-level security biometric application.com/page/pt-br/book/export/html/361 Furthermore. Deploying a Fingerprint SDK Based Application This section presents the files that are required to be packaged with a Fingerprint SDK based application in order to have it working when installed. when Fingerprint SDK library is running with a trial license. any required JAR file must be added to the CLASSPATH variable. A valid license file must be placed in one of these locations or the library will not work. any required DLL file must be copied to the application folder.Fingerprint SDK 2009 Developer's Manual http://www. For the English version of the Windows operating system.g. create the folder if it doesn't exist. template has medium quality GR_HIGH_QUALITY 2 Extraction succeeded. In Windows Vista.. the environment variable APPDATA contains this path. As an utmost option. default value will be used GR_ENROLL_NOT_READY 0 Enrollment process not ready GR_ENROLL_SUFFICIENT 1 Sufficient enrollment GR_ENROLL_GOOD 2 Good enrollment GR_ENROLL_VERY_GOOD 3 Very good enrollment GR_ENROLL_MAX_LIMIT_REACHED 4 Maximum limit of consolidated templates was reached Initialization Error Codes GR_ERROR_INITIALIZE_FAIL -1 Initialization failed GR_ERROR_NOT_INITIALIZED -2 GrFinger isn't initialized GR_ERROR_FAIL_LICENSE_READ -3 GrFinger couldn't read the license file GR_ERROR_NO_VALID_LICENSE -4 No valid license found GR_ERROR_NULL_ARGUMENT -5 A null parameter was supplied GR_ERROR_FAIL -6 Unexpected failure GR_ERROR_ALLOC -7 Memory allocation failure GR_ERROR_PARAMETERS -8 An incorrect parameter was supplied Extraction and Matching Error Codes GR_ERROR_WRONG_USE -107 Function can't be called at this time GR_ERROR_EXTRACT -108 Error extracting template GR_ERROR_SIZE_OFF_RANGE -109 Image size is too big GR_ERROR_RES_OFF_RANGE -110 Image resolution is out of the valid range GR_ERROR_CONTEXT_NOT_CREATED -111 Context couldn't be created 12 of 63 GR_ERROR_INVALID_CONTEXT -112 Context isn't valid GR_ERROR_ERROR -113 General. the table below shows the most likely locations of the <COMMON APPLICATION DATA>\Griaule folder. During application installation. The first location is the application's folder. template has bad quality GR_MEDIUM_QUALITY 1 Extraction succeeded. Windows version Folder Windows Vista C:\ProgramData\Griaule\ Windows XP Windows 2000 Windows 2003 C:\Documents and Settings\All Users\Application Data\Griaule\ Programming Reference Guide Return Codes and Constants Parameters Descriptions Fingerprint SDK DLL Reference Guide Fingerprint SDK ActiveX Reference Guide Fingerprint SDK Java for Windows Reference Guide Fingerprint SDK. XP. For Java applications. unexpected or unknown error 3/4/2009 14:33 . Other Windows versions or non-English Windows may have slightly different paths.com/page/pt-br/book/export/html/361 All files required by Fingerprint SDK can be found in the "bin" folder in the SDK root folder. it searches for a license file in two locations in the filesystem. template has high quality GR_MATCH 1 Fingerprints match GR_NOT_MATCH 0 Fingerprints don't match GR_DEFAULT_USED 3 A supplied parameter is invalid or out of range. 2000 and 2003 operating systems. Licensing Fingerprint SDK Based Deployed Applications Every time the Fingerprint SDK library is initialized. This is the recommended location where to copy the license file when installing a Fingerprint SDK based application. The second location is recommended only for developers and provides a system and user independent license location: it's the <COMMON APPLICATION DATA>\Griaule folder. The path <COMMON APPLICATION DATA> is the file system folder containing application data for all users.NET Reference Guide Return Codes and Constants Return codes Event constants Image constants Matching constants Context constants Licensing constants Template format constants Return codes Success Codes GR_OK 0 Success GR_BAD_QUALITY 0 Extraction succeeded. to a system folder (for e. SYSTEM folder) or to a folder included in the PATH variable. The list of supported fingerprint readers is available in the Fingerprint Readers Support section.griaulebiometrics. com/page/pt-br/book/export/html/361 -114 Supplied template buffer is too small to hold the template Capture Error Codes GR_ERROR_CONNECT_SENSOR -201 Error connecting to the fingerprint reader GR_ERROR_CAPTURING -202 Error while acquiring image GR_ERROR_CANCEL_CAPTURING -203 Capture has been canceled GR_ERROR_INVALID_ID_SENSOR -204 Invalid fingerprint reader ID GR_ERROR_SENSOR_NOT_CAPTURING -205 Capture wasn't started on the fingerprint reader GR_ERROR_INVALID_EXT -206 Invalid file extension GR_ERROR_INVALID_FILENAME -207 Invalid filename GR_ERROR_INVALID_FILETYPE -208 Invalid file type GR_ERROR_SENSOR -209 Fingerprint reader error License Error Codes GR_ERROR_GET_HARDWARE_KEY -301 Unable to get your hardware key GR_ERROR_INTERNET_CONNECTION -302 Error internet connection GR_ERROR_BAD_REQUEST -303 Bad request GR_ERROR_INVALID_PRODUCT_KEY -304 Invalid product key GR_ERROR_INSUFFICIENT_CREDIT -305 Insufficient credit GR_ERROR_NO_HARDWARE_BOUND -306 No hardware-bound license GR_ERROR_HTTP_AUTHORIZATION -307 HTTP authentication failed GR_ERROR_WRONG_PRODUCT_KEY -308 Wrong product key GR_ERROR_INTERNAL_SERVER -309 Internal server error GR_ERROR_WRITING_LICENSE_FILE -310 Unable to write the license file GR_ERROR_PK_NOT_LINKED -311 Product key not linked with a Griaule Account GR_ERROR_PK_NOT_APPROVED -312 Product key not approved yet Template format constants Template Format Values GR_FORMAT_DEFAULT 0 Fingerprint SDK's default template format GR_FORMAT_GR001 1 Fingerprint SDK private template format. Version 3 GR_FORMAT_CLASSIC 100 Legacy template format GR_FORMAT_ISO 200 ISO 19794-2 Compliant template Format GR_FORMAT_ANSI 201 ANSI 378-2004 Compliant template Format Event constants Event Codes GR_PLUG 21 A fingerprint reader was plugged on the machine GR_UNPLUG 20 A fingerprint reader was unplugged from the machine GR_FINGER_DOWN 11 A finger was placed over the fingerprint reader GR_FINGER_UP 10 A finger was removed from the fingerprint reader Image constants Picture File Formats GRCAP_IMAGE_FORMAT_BMP 501 Windows Bitmap (BMP) image format Image Values 13 of 63 GR_DEFAULT_RES 500 Default resolution value for an image in DPI GR_DEFAULT_DIM 500 Maximum width and height of an image in pixels that is processed on template extraction GR_MAX_SIZE_TEMPLATE 10000 Maximum template size in bytes GR_MAX_IMAGE_WIDTH 1280 Maximum acceptable image width in pixels GR_MAX_IMAGE_HEIGHT 1280 Maximum acceptable image height in pixels GR_MAX_RESOLUTION 1000 Maximum acceptable image resolution in DPI GR_MIN_IMAGE_WIDTH 50 Minimum acceptable image width in pixels 3/4/2009 14:33 .Fingerprint SDK 2009 Developer's Manual GR_ERROR_NOT_ENOUGH_SPACE http://www. Version 2 (Embedded template) GR_FORMAT_GR003 3 Fingerprint SDK private template format. Version 1 GR_FORMAT_GR002 2 Fingerprint SDK private template format.griaulebiometrics. out] The parameter is used both to pass values in and to pass results back out of the function. [in] height Fingerprint image height in pixels. On failure.The template array must be already allocated. the appropriate error code is returned.griaulebiometrics. [in] res Fingerprint image resolution in DPI. Fingerprint SDK DLL Reference Guide Initialization and finalization functions Matching functions Enrollment Functions Extraction functions Capture functions Biometric display functions Other functions Callback handlers Enrollment Functions GrEnroll GrStartEnroll GrEnroll Enrolls a fingerprint image. method or event parameter is presented along with its description and type. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. The parameter type is inside square brackets and may be: [in] The parameter is used only to pass values in to the function. Prerequisites Prerequisites The Fingerprint SDK library must have been previously initialized.com/page/pt-br/book/export/html/361 536870911 No defined color for biometric display Matching constants Matching Values GR_MAX_THRESHOLD 200 Maximum threshold value GR_MIN_THRESHOLD 10 Minimum threshold value GR_VERYLOW_FRR 30 Threshold value for a very low FRR (1 false rejection in 1000) GR_LOW_FRR 45 Threshold value for a low FRR (1 false rejection in 100) GR_LOW_FAR 60 Threshold value for a low FAR (1 false acceptance in 300000) GR_VERYLOW_FAR 80 Threshold value for a very low FAR (1 false acceptance in 3000000) GR_ROT_MIN 0 Minimum rotation tolerance GR_ROT_MAX 180 Maximum rotation tolerance Context constants Context Values GR_DEFAULT_CONTEXT 0 Default context GR_NO_CONTEXT -1 No context Licensing constants License Types GRFINGER_FULL 1 Fingerprint IDENTIFICATION SDK license agreement GRFINGER_LIGHT 2 Fingerprint VERIFICATION SDK license agreement Parameters Descriptions Each function. Return On success. [in. Parameters 14 of 63 [in] rawImage A raw grayscale fingerprint image. the enroll quality code is returned.Fingerprint SDK 2009 Developer's Manual GR_MIN_IMAGE_HEIGHT 50 Minimum acceptable image height in pixels GR_MIN_RESOLUTION 125 Minimum acceptable image resolution in DPI GR_IMAGE_NO_COLOR http://www. [in] width Fingerprint image width in pixels. [out] The parameter is used only to pass values back from the function. 3/4/2009 14:33 . stdcall. Declaration C++ int result. GR_FORMAT_DEFAULT.width. the appropriate error code is returned. Sample Code C++ int result. set template size to 0 // Result < 0 => enrollment problem if (ret < 0 ) then template. _raw.Res. On failure. Parameters [in] context Context in which the enrollment will be started. GrStartEnroll Starts the enrollment process. &_tpt->_size.com/page/pt-br/book/export/html/361 The byte array in which the fingerprint template will be stored.img. Delphi function GrStartEnroll(context: Integer): Integer. // if error. GR_DEFAULT_CONTEXT). Delphi Var ret: Integer.size := 0. raw. set template size to 0 if (result < 0){ // Result < 0 => enrollment problem _tpt->_size = 0. [out] quality The template quality.griaulebiometrics. } Delphi Var ret: Integer. Declaration C++ int __stdcall GrInitialize(). Return On success.size := GR_MAX_SIZE_TEMPLATE. // set current buffer size for the consolidated template _tpt->_size = GR_MAX_SIZE_TEMPLATE. GR_DEFAULT_CONTEXT).size. GR_OK is returned. [in] tptFormat The template format to be used.width.img. Begin // set current buffer size for the consolidated template template. raw.height. End.tpt. [out] The size in bytes of the extracted template.Fingerprint SDK 2009 Developer's Manual http://www. &_tpt->_quality. ret := GrEnroll(raw. result = GrStartEnroll(GR_DEFAULT_CONTEXT). creates the default context and checks for a valid license on system. _raw. Return On success.res. On failure.height. [out] tpt [in. // if error. End. Declaration C++ int __stdcall GrStartEnroll(int context). Prerequisites The Fingerprint SDK library must have been previously initialized. Prerequisites A valid license must exist on system. result = GrEnroll(_raw. GR_OK is returned.quality. The fingerprint templates are consolidated to create a trustable one. Initialization and finalization functions GrInitialize GrFinalize GrCreateContext GrDestroyContext GrInitialize Initializes the Fingerprint SDK library. template. GR_FORMAT_DEFAULT. [in] context Context in which the enrollment will be performed. (char*)_tpt->_tpt.out] tptSize [in] The maximum size in bytes of the byte array supplied. _raw. template. raw. 15 of 63 3/4/2009 14:33 . template. Begin ret := GrStartEnroll(GR_DEFAULT_CONTEXT). the appropriate error code is returned. Delphi Var contextId : integer. GrFinalize Finalizes the Fingerprint SDK library. GrCreateContext Creates a context in which extraction. //Initialize the library result = GrInitialize(). Delphi retVal:=GrFinalize(). Delphi // Initializing the library. Declaration C++ int __stdcall GrDestroyContext (int contextId). Prerequisites The Fingerprint SDK library must have been previously initialized. Sample Code C++ retVal=GrFinalize(). the appropriate error code is returned. Declaration C++ int __stdcall GrCreateContext (int *contextId). Return On success. Delphi function GrCreateContext( var contextId: Integer): Integer. On failure. GR_OK is returned. On failure. err := GrInitialize().griaulebiometrics. Declaration C++ int __stdcall GrFinalize(). stdcall. stdcall. Parameters [in] contextId The identifier of the context to be destroyed.Fingerprint SDK 2009 Developer's Manual http://www. GR_OK is returned. freeing any resource used. the appropriate error code is returned. GR_OK is returned. stdcall. Parameters [out] contextId The identifier of the newly created context. the appropriate error code is returned. Return On success.com/page/pt-br/book/export/html/361 Delphi function GrInitialize: Integer. verification and identification may be performed. Sample Code C++ int result. Delphi function GrDestroyContext(contextId: Integer): Integer. Prerequisites The Fingerprint SDK library must have been previously initialized. Prerequisites The Fingerprint SDK library must have been previously initialized. begin retVal:=GrCreateContext(var contextId). GrDestroyContext Destroys a context. Delphi function GrFinalize: Integer. 16 of 63 3/4/2009 14:33 . retVal=GrCreateContext(&contextId). On failure. stdcall. Sample Code C++ int contextId=0. Return On success. score. tpt: PSafeArray. if ((tptRef->_tpt == NULL) || (tptRef->_size == 0)){ return ERR_INVALID_ID. _size = 0. Matching functions GrVerify GrIdentifyPrepare GrIdentify GrSetIdentifyParameters GrSetVerifyParameters GrGetIdentifyParameters GrGetVerifyParameters GrVerify Performs a verification by comparing the two templates supplied. } } TTemplate *tptRef. GR_DEFAULT_CONTEXT). char *referenceTemplate. context: Integer): Integer. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. // clean-up destructor Destroy. int context). Parameters [in] queryTemplate Query template to be verified. [out] verifyScore Verification matching score. public Array _tpt. tptRef = _DB->getTemplate(id). On failure. tptRef: TTemplate. end.griaulebiometrics. // Checking if the template is valid. int *verifyScore. Return On success. Delphi function GrVerify(queryTemplate: PChar. [in] referenceTemplate Reference template for verification. stdcall. (char*)tptRef->_tpt. Begin // Checking if the template is valid. GR_MATCH is returned if the matching score is higher than the verification threshold. // Getting the template with the supplied ID from the database. [in] context Context in which the verification will be performed. // Template size public int _size. Prerequisites The Fingerprint SDK library must have been previously initialized. // Allocates space to template constructor Create. if not(TemplateIsValid()) then begin Verify := ERR_INVALID_TEMPLATE. 17 of 63 3/4/2009 14:33 .com/page/pt-br/book/export/html/361 Sample Code C++ retVal=GrDestroyContext(contextId). referenceTemplate: PChar.GR_MAX_SIZE_TEMPLATE]. result = GrVerify((char*)_tpt->_tpt.Fingerprint SDK 2009 Developer's Manual http://www. exit. } // Comparing the templates. otherwise GR_NOT_MATCH is returned. Delphi type // Class TTemplate // Define a type to temporary storage of template TTemplate = class public // Template data. var verifyScore: Integer. // Template size size: Integer. end. // Template ID (if retrieved from DB) id: Integer. Sample Code C++ public class TTemplate { // Template data. Delphi retVal:=GrDestroyContext(contextId). the appropriate error code is returned. Var ret: Integer. // Checking if the ID was found. See also Return codes Declaration C++ int __stdcall GrVerify(char *queryTemplate. override. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. int result. GR_MAX_SIZE_TEMPLATE]. // Comparing the current template. // Template size public int _size.tpt. context: Integer): Integer. Declaration C++ int __stdcall GrIdentifyPrepare (char *templateQuery.tpt = nil) or (tptRef. _size = 0.tpt. // Starting the identification process and supplying the query //template. the appropriate error code is returned. end. if not(TemplateIsValid())then begin Identify := ERR_INVALID_TEMPLATE.tpt. On failure. exit.tpt. Parameters [in] templateQuery Query template to be identified. // Checking if the query template and the reference template match. exit. Verify := GrVerify(template. GR_DEFAULT_CONTEXT). 18 of 63 3/4/2009 14:33 . end. exit. result = GrIdentify((char*)tptRef->_tpt. tptRef := DB. if(result == GR_MATCH){ id = _DB->getId(rs). // Allocates space to template constructor Create. ID (if retrieved from DB) Integer. Begin // Checking if the template is valid. &score. Delphi function GrIdentifyPrepare(templateQuery: PChar. if ((tptRef. tptRef: TTemplate. // Getting the current template from the recordset.Fingerprint SDK 2009 Developer's Manual http://www. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. end else if (ret < 0) then begin Identify := ret. Prerequisites The identification must be previously prepared by calling the GrIdentifyPrepare function. tptRef = _DB->getTemplate(rs). public Array _tpt. The GrVerify function must not be called beween the call to GrIdentifyPrepare function and a call to GrIdentify function. ret := GrIdentify(tptRef. end. } Delphi type // Class TTemplate // Define a type to TTemplate = class public // Template tpt: // Template size: // Template id: temporary storage of template data. // Checking if the query template and the reference template match.griaulebiometrics. // Checking if the template is valid. Var ret: Integer. score. [in] context Context in which the identification will be performed.getTemplate(id). Prerequisites The Fingerprint SDK library must have been previously initialized. Return On success. override. int context). GR_DEFAULT_CONTEXT). GR_DEFAULT_CONTEXT).id. The Fingerprint SDK library must have been previously initialized.size <= 0)) then begin Verify := ERR_INVALID_ID. GrIdentify Performs an identification by comparing the supplied reference template against the previously prepared query template. // Comparing the templates. PSafeArray. end. size Integer. stdcall. Sample Code C++ public class TTemplate { // Template data. GR_DEFAULT_CONTEXT). tptRef. GrIdentifyPrepare Prepares a query template to be identified against one or more reference templates. // Starting the identification process and supplying the query //template. GR_OK is returned. result = GrIdentifyPrepare((char*)_tpt->_tpt. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. // clean-up destructor Destroy. // Comparing the current template. score. } } TTemplate *tptRef. ret := GrIdentifyPrepare(template.com/page/pt-br/book/export/html/361 // Getting the template with the supplied ID from the database. GR_DEFAULT_CONTEXT). if (ret = GR_MATCH) then begin Identify := tptRef. end. // Checking if the query template and the reference template match. See also Return codes Declaration C++ GrIdentify (char *templateReference.com/page/pt-br/book/export/html/361 On success. // Comparing the current template. // Getting the current template from the recordset. Delphi function GrIdentify(templateReference: PChar. end else if (ret < 0) then begin Identify := ret. Prerequisites The Fingerprint SDK library must have been previously initialized. if not(TemplateIsValid())then begin Identify := ERR_INVALID_TEMPLATE. exit. tptRef: TTemplate. result = GrIdentify((char*)tptRef->_tpt. the appropriate error code is returned. _size = 0. otherwise GR_NOT_MATCH is returned. Sample Code C++ public class TTemplate { // Template data. int *identifyScore. Return If any supplied parameter is invalid or out of range. 3/4/2009 14:33 . if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. stdcall.tpt. GrSetIdentifyParameters Sets the identification parameters in the supplied context. Var ret: Integer. Parameters [in] templateReference Reference template for identification. GR_OK is returned. // Comparing the current template. context: Integer): Integer. // clean-up destructor Destroy. end. exit. PSafeArray. GR_DEFAULT_CONTEXT).tpt. if (ret = GR_MATCH) then begin Identify := tptRef. // Checking if the query template and the reference // template match. override. &score. Parameters [in] identifyThreshold 19 of 63 The identification score threshold. end. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. ret := GrIdentify(tptRef. } Delphi type // Class TTemplate // Define a type to TTemplate = class public // Template tpt: // Template size: // Template id: temporary storage of template data. public Array _tpt. tptRef = _DB->getTemplate(rs). On failure. // Allocates space to template constructor Create. Begin // Checking if the template is valid. // Template size public int _size. the appropriate error code is returned. ret := GrIdentifyPrepare(template.GR_MAX_SIZE_TEMPLATE]. // Starting the identification process and supplying the query //template. result = GrIdentifyPrepare((char*)_tpt->_tpt. size Integer. [in] context Context in which the identification will be performed. GR_DEFAULT_CONTEXT). } } TTemplate *tptRef. [out] identifyScore Identification matching score. score. int context). On failure. GR_DEFAULT_CONTEXT).Fingerprint SDK 2009 Developer's Manual Return http://www. if(result == GR_MATCH){ id = _DB->getId(rs).id. // Checking if the template is valid. end. GR_DEFAULT_CONTEXT). ID (if retrieved from DB) Integer. var identifyScore: Integer. its default value will be used and GR_DEFAULT_USED is returned. GR_MATCH is returned if the matching score is higher than the identification threshold.griaulebiometrics. On success. // Starting the identification process and supplying the query template. its default value will be used and GR_DEFAULT_USED is returned. [in] context Context in which the verification parameters will be set. Delphi function GrSetIdentifyParameters(identifyThreshold: Integer. GR_DEFAULT_CONTEXT). Default values will be used. stdcall. Delphi function GrSetVerifyParameters(VerifyThreshold: Integer. See also Matching constants Context constants Declaration C++ int __stdcall GrSetVerifyParameters (int verifyThreshold. GR_DEFAULT_CONTEXT). end. identifyRotationTolerance: Integer. Default values will be used. // error? if (ret == GR_DEFAULT_USED) { MessageBox::Show("Invalid identify parameters values. On failure. int identifyRotationTolerance. rotationMaxId. Sample Code C++ // set the new verification parameters ret = GrSetVerifyParameters(thresholdVr. [in] context Context in which the identification parameters will be set. [in] verifyRotationTolerance The rotation tolerance for the verification process. int context). GR_DEFAULT_CONTEXT). GR_DEFAULT_CONTEXT).Fingerprint SDK 2009 Developer's Manual http://www."). GR_OK is returned."). Default values will be used. the appropriate error code is returned. } Delphi ret := GrSetIdentifyParameters(thresholdId. GrGetIdentifyParameters Retrieves the identification parameters for the supplied context. Return If any supplied parameter is invalid or out of range. On success. rotationMaxVr. rotationMaxId.com/page/pt-br/book/export/html/361 [in] identifyRotationTolerance The rotation tolerance for the identification process. Prerequisites The Fingerprint SDK library must have been previously initialized.griaulebiometrics. } Delphi // set the new verification parameters ret := GrSetVerifyParameters(thresholdVr. On failure. // error? if ret = GR_DEFAULT_USED then begin showmessage('Invalid identify parameters values. Parameters 20 of 63 3/4/2009 14:33 .'). Prerequisites The Fingerprint SDK library must have been previously initialized. end. GrSetVerifyParameters Sets the verification parameters in the supplied context. context: Integer): Integer. the appropriate error code is returned. rotationMaxVr. Parameters [in] verifyThreshold The verification score threshold. Return On success. VerifyRotationTolerance: Integer. // error? if ret = GR_DEFAULT_USED then begin showmessage('Invalid verify parameters values. Sample Code C++ ret = GrSetIdentifyParameters(thresholdId. Default values will be used. stdcall. GR_OK is returned. See also Matching constants Context constants Declaration C++ int __stdcall GrSetIdentifyParameters (int identifyThreshold. int context). int verifyRotationTolerance. context: Integer): Integer. // error? if (ret == GR_DEFAULT_USED) { MessageBox::Show("Invalid verify parameters values.'). &rotationMaxVr. 21 of 63 3/4/2009 14:33 . Delphi Var thresholdId : Integer. rotationMaxVr. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. Delphi function GrGetVerifyParameters(var verifyThreshold: Integer. context: Integer): Integer. int &identifyRotationTolerance. GrGetVerifyParameters(&thresholdVr. [in] context Context from which the verification parameters will be retrieved. rotationMaxVr: Integer. [out] identifyRotationTolerance The current rotation tolerance for the identification process. The template array must be already allocated. GR_DEFAULT_CONTEXT). Sample Code C++ int thresholdId. GR_DEFAULT_CONTEXT). rotationMaxVr. stdcall. On failure. int context). rotationMaxId. Prerequisites The template array must be already allocated. Delphi function GrGetIdentifyParameters(var identifyThreshold: Integer. End Extraction functions GrCovertTemplate GrExtractEx GrExtract GrCovertTemplate The Fingerprint SDK library must have been previously initialized.com/page/pt-br/book/export/html/361 The current identification score threshold. See also Matching constants Context constants Declaration C++ int __stdcall GrGetIdentifyParameters (int &identifyThreshold. var identifyRotationTolerance: Integer.Fingerprint SDK 2009 Developer's Manual [out] identifyThreshold http://www. Return On success. stdcall. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. rotationMaxId: Integer. rotationMaxId. begin GrGetIdentifyParameters(thresholdId. Prerequisites The Fingerprint SDK library must have been previously initialized. begin GrGetVerifyParameters(thresholdVr. GR_OK is returned. end GrGetVerifyParameters Retrieves the verification parameters for the supplied context. [in] context Context from which the identification parameters will be retrieved. GR_DEFAULT_CONTEXT). Parameters [out] verifyThreshold The current verification score threshold. See also Matching constants Context constants Declaration C++ int __stdcall GrGetVerifyParameters (int &verifyThreshold. int context). the appropriate error code is returned. GrGetIdentifyParameters(&thresholdId. context: Integer): Integer. Sample Code C++ int thresholdVr. [out] verifyRotationTolerance The current rotation tolerance for the verification process. Delphi var thresholdVr : Integer. var verifyRotationTolerance: Integer.griaulebiometrics. int &verifyRotationTolerance. GR_DEFAULT_CONTEXT). &rotationMaxId. context: Integer): Integer. int* newTptSize. Prerequisites The template array must be already allocated.griaulebiometrics. stdcall. char *tpt. Delphi function GrExtract(rawimage: Pchar. } Delphi Var ret: Integer. GR_OK is returned. int width. GR_DEFAULT_CONTEXT. // set current buffer size for the extract template _newTpt->_size = GR_MAX_SIZE_TEMPLATE. [out] The size in bytes of the converted template. Parameters [in] oldTpt The template to convert. [in] context Context in which the extraction will be performed.size. GR_FORMAT_DEFAULT). int format). [out] The size in bytes of the extracted template. GR_FORMAT_DEFAULT). set template size to 0 if (result < 0){ // Result < 0 => conversion problem _newTpt->_size = 0. int height. the template quality code is returned.size := GR_MAX_SIZE_TEMPLATE. the appropriate error code is returned. var newTptSize: Integer. var tptSize: Integer.tpt. Return On success. the appropriate error code is returned. (char*)_newTpt->_tpt. Parameters [in] rawImage A raw grayscale fingerprint image. The Fingerprint SDK library must have been previously initialized.out] tptSize [in] context [in] The maximum size in bytes of the byte array supplied. Begin // set current buffer size for the extract template newTemplate. // if error. [out] tpt The byte array in which the fingerprint template will be stored. GrExtract Extracts a fingerprint template from the supplied fingerprint raw image.out] newTptSize [in]The maximum size in bytes of the byte array supplied. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. [in] format The template format to be used. GR_DEFAULT_CONTEXT. res: Integer. context: Integer. int res. stdcall. ret := GrConvertTemplate(oldTemplate. // if error. Sample Code C++ int result. [out] newTpt The converted template. [in] width [in] Fingerprint image width in pixels. set template size to 0 // Result < 0 => conversion problem if (ret < 0 ) then newTemplate. Context in which the extraction will be performed. result = GrConvertTemplate((char*)_oldTpt. Declaration C++ int __stdcall GrExtract(unsigned char *rawimage. char* newTpt.tpt.size := 0. End. int context. width: Integer. newTemplate. [in. [in. int *tptSize. tpt: PChar. format: Integer): Integer. height: Integer. int context). 22 of 63 3/4/2009 14:33 . [in] height Fingerprint image height in pixels. Delphi function GrConvertTemplate(oldTpt: Pchar.Fingerprint SDK 2009 Developer's Manual Return http://www. Declaration C++ int __stdcall GrConvertTemplate(char* oldTpt. &_newTpt->_size.com/page/pt-br/book/export/html/361 On success. newTpt: PChar. On failure. newTemplate. On failure. [in] res Fingerprint image resolution in DPI. template. Declaration C++ int __stdcall GrExtractEx(unsigned char *rawimage. height: Integer.size := 0. set template size to 0 if (result < 0){ // Result < 0 => extraction problem _tpt->_size = 0. raw. GR_DEFAULT_CONTEXT.Res. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. ret := GrExtractEx(raw. GR_DEFAULT_CONTEXT). // if error.size. raw. (char*)_tpt->_tpt. Begin // set current buffer size for the extract template template. _raw. int tptFormat). res: Integer. set template size to 0 // Result < 0 => extraction problem if (ret < 0 ) then template. context: Integer. the template quality code is returned. [in] context Context in which the extraction will be performed.height. (char*)_tpt->_tpt. GR_DEFAULT_CONTEXT. End. On failure. _raw. Return On success. GR_DEFAULT_CONTEXT). _raw. } Delphi Var ret: Integer. [in. End. tpt: PChar. _raw.size := 0. Delphi function GrExtractEx(rawimage: Pchar.out] tptSize [in] The maximum size in bytes of the byte array supplied.width. raw. result = GrExtract(_raw.img.img. the appropriate error code is returned.tpt.height. from the supplied fingerprint raw image. [in] height Fingerprint image height in pixels. Capture functions GrCapInitialize GrCapFinalize GrCapStartCapture 23 of 63 3/4/2009 14:33 .Res. var tptSize: Integer.size := GR_MAX_SIZE_TEMPLATE. // if error. set template size to 0 // Result < 0 => extraction problem if (ret < 0 ) then template. raw. // if error. set template size to 0 if (result < 0){ // Result < 0 => extraction problem _tpt->_size = 0. _raw. Prerequisites The Fingerprint SDK library must have been previously initialized. int *tptSize. Begin // set current buffer size for the extract template template. GR_FORMAT_DEFAULT). [in] res Fingerprint image resolution in DPI. char *tpt. // set current buffer size for the extract template _tpt->_size = GR_MAX_SIZE_TEMPLATE.Fingerprint SDK 2009 Developer's Manual http://www. &_tpt->_size.res.size := GR_MAX_SIZE_TEMPLATE. stdcall.width. raw.griaulebiometrics. } Delphi Var ret: Integer.tpt. template. int res. // if error. int height. GrExtractEx Extracts a fingerprint template.res. [in] tptFormat The template format to be used. // set current buffer size for the extract template _tpt->_size = GR_MAX_SIZE_TEMPLATE. Sample Code C++ int result. tptFormat: Integer): Integer.width. template. in a specified format.com/page/pt-br/book/export/html/361 Sample Code C++ int result. &_tpt->_size.size. [in] width [in] Fingerprint image width in pixels.height.width. Parameters [in] rawImage A raw grayscale fingerprint image. int context. ret := GrExtract(raw. [out] The size in bytes of the extracted template. raw. [out] tpt The byte array in which the fingerprint template will be stored. result = GrExtractEx(_raw. The template array must be already allocated. GR_FORMAT_DEFAULT). width: Integer.img. _raw.img. template. int width.height. stdcall. On failure. Prerequisites A valid license must exist on system. Sample Code C++ retVal= GrCapFinalize(). Delphi retVal:= GrCapInitialize (@StatusEventHandler). GrCapStartCapture Starts capturing fingerprint images from the supplied fingerprint reader. the appropriate error code is returned. Parameters [in] idSensor The ID of the fingerprint reader to start capturing images from. Prerequisites Return The capture module must have been previously initialized. GR_OK is returned. [in] FingerEventHandler Callback function responsible for handling the finger events. Prerequisites The capture module must have been previously initialized. On success. See also Callback handlers Declaration C++ int __stdcall GrCapInitialize(StatusCallBack* StatusEventHandler). GR_OK is returned. [in] ImageEventHandler Callback function responsible for handling the image event. ImageCallBack* ImageEventHandler). Delphi function GrCapFinalize(): Integer. freeing any resource used. Return On success.Fingerprint SDK 2009 Developer's Manual http://www. On failure. Declaration C++ int __stdcall GrCapFinalize(). On failure.griaulebiometrics. Delphi retVal:= GrCapFinalize(). See also Callback handlers Declaration C++ int __stdcall GrCapStartCapture(char* idSensor. stdcall.com/page/pt-br/book/export/html/361 GrCapStopCapture GrCapSaveRawImageToFile GrCapLoadImageFromFile GrCapRawImageToHandle GrCapInitialize Initializes the fingerprint capture module. 24 of 63 3/4/2009 14:33 . working and recognized as plugged by the capture module. the appropriate error code is returned. GrCapFinalize Stops the capture module. Sample Code C++ retVal= GrCapInitialize (StatusEventHandler). Return On success. the appropriate error code is returned. The supplied fingerprint reader must be connected. GR_OK is returned. FingerCallBack* FingerEventHandler. Parameters [in] StatusEventHandler Callback function responsible for handling the status events. Delphi Function GrCapInitialize(StatusEventHandler: GRCAP_STATUS_EVENT_PROC): Integer. "). 25 of 63 3/4/2009 14:33 . Return On success. unsigned int height. On failure. _raw. unsigned int width. On failure. the appropriate error code is returned. char* fileName. stdcall. On success. GrCapStopCapture(idSensor).com/page/pt-br/book/export/html/361 Delphi function GrCapStartCapture(idSensor: PChar. myImageCallBack). myFingerCallBack. Sample Code C++ char *temp = (char*)Marshal::StringToHGlobalAnsi(sfdImage-> FileName). [in] filename The complete path and filename of the picture file to create. } Delphi if (event = GR_UNPLUG) then // Stop capturing from the unplugged reader. GR_OK is returned. Prerequisites Return The capture module must have been previously initialized. Delphi function GrCapSaveRawImageToFile(rawImage: PChar. Sample Code C++ if (event == GR_PLUG) { // Start capturing from the plugged reader. if (GrCapSaveRawImageToFile(_raw. @FingerCallback. stdcall. [in] height Fingerprint image height in pixels.ToPointer().img. ImageEventHandler: GRCAP_IMAGE_EVENT_PROC): Integer. Declaration C++ int GrCapStopCapture (string idSensor) Delphi Function GrCapStopCapture(const idSensor: WideString): integer.griaulebiometrics. filename: String. height: Integer. Parameters [in] idSensor The ID of the fingerprint reader to stop capturing images from. GrCapStartCapture(idSensor. temp. @ImageCallback) GrCapStopCapture Stops capturing fingerprint images from the supplied fingerprint reader. the appropriate error code is returned.height. GrCapStartCapture(idSensor. Sample Code C++ if (event == GR_UNPLUG) { // Stop capturing from the unplugged reader GrCapStopCapture(idSensor). width. GRCAP_IMAGE_FORMAT_BMP) != GR_OK) { WriteLog("Failed to save the file.Fingerprint SDK 2009 Developer's Manual http://www. _raw. Image capture must have been previously started on the supplied fingerprint reader. GRCAP_IMAGE_FORMAT imageFormat). } Marshal::FreeHGlobal((int)temp). Parameters [in] rawImage A raw grayscale fingerprint image.width. GR_OK is returned. [in] imageFormat Picture file format. imageFormat: GRCAP_IMAGE_FORMAT): Integer. Prerequisites A valid license must exist on system. FingerEventHandler: GRCAP_FINGER_EVENT_PROC. See also Image constants Fingerprint Image Format Declaration C++ int __stdcall GrCapSaveRawImageToFile(unsigned char* rawImage. GrCapSaveRawImageToFile Saves a raw grayscale fingerprint image as a picture file. } Delphi if (event = GR_PLUG) then // Start capturing from the plugged reader. [in] width Fingerprint image width in pixels. HBITMAP &handle). [in] height Fingerprint image height in pixels. Prerequisites A valid license must exist on system. Parameters [in] fileName The complete path and filename of the picture file to load. raw. GR_OK is returned.Height. [in] hdc The device context handle (HDC) in which the bitmap will be created. Delphi // Getting image resolution. GrCapLoadImageFromFile Loads a grayscale fingerprint image from a picture file. if (resolution != 0) GrCapLoadImageFromFile(FileName. The capture module must have been previously initialized. resolution := StrToInt(InputBox('What is the image resolution?'. GR_OK is returned. On failure. HDC hdc.img.'). Image capture must have been previously started on the "File" sensor. int resolution = Convert::ToInt32(InputBox::ShowModal("What is the image resolution?". the appropriate error code is returned. Sample Code C++ // Getting the resolution. GrCapRawImageToHandle Returns a displayable Windows bitmap handle (HBITMAP) to the supplied raw grayscale fingerprint image. end. unsigned int width. height: Integer. if (resolution <> 0) then begin GrCapLoadImageFromFile(FileName. "")). [in] width Fingerprint image width in pixels. See also Callback handlers Declaration C++ int __stdcall GrCapLoadImageFromFile(char* fileName. hdc: HDC. [in] res Remarks On success. // Checking if the action was canceled. Delphi function GrCapLoadImageFromFile(filename: String. raw. an image event is fired for the "File" sensor. "Resolution". [out] handle The displayable fingerprint image Windows bitmap handle (HBITMAP). unsigned int height. Return On success.griaulebiometrics. Parameters [in] rawImage A raw grayscale fingerprint image.com/page/pt-br/book/export/html/361 Delphi if GrCapSaveRawImageToFile(raw. res: Integer): Integer.resolution). 'Resolution'. '')). the appropriate error code is returned. width. as defined in the Image constants section. On failure. See also Fingerprint Image Format Declaration C++ int __stdcall GrCapRawImageToHandle(unsigned char* rawImage. // Checking if the action was canceled. no value or an invalid value was entered. var handle: HBITMAP): Integer. stdcall. int res). fname. no value or an invalid value was entered. Sample Code C++ // handle to finger image 26 of 63 3/4/2009 14:33 . Prerequisites Picture file must be in one of the supported formats. Return On success. GRCAP_IMAGE_FORMAT_BMP) <> GR_OK then WriteLog('Failed to save the file. resolution). Delphi function GrCapRawImageToHandle(rawImage: PChar.Fingerprint SDK 2009 Developer's Manual http://www.width. stdcall. Image resolution in DPI. // screen HDC HDC hdc = GetDC(0).griaulebiometrics. [in] hdc The device context handle (HDC) in which the bitmap will be created. // screen HDC 27 of 63 3/4/2009 14:33 . hdc). HBITMAP &handle. unsigned int height. TTemplate(void). // draw image on picture box if handle <> 0 then begin formMain. context: Integer): Integer. hdc. [out] handle The displayable fingerprint image Windows bitmap handle (HBITMAP).width. hdc). _raw. segments and minutiae direction of the supplied fingerprint drawn. this parameter must be GR_NO_CONTEXT. raw.Repaint(). int res. handle). segments and minutiae direction drawn. }.img. System::Object *img.image.Fingerprint SDK 2009 Developer's Manual http://www. // Template size int _size. // Raw image data type. HDC hdc. Delphi function GrBiometricDisplay (templateReference: Pchar. // draw image on picture box if (handle != NULL) { Image *curImage = System::Drawing::Image::FromHbitmap(handle). handle).height. // release screen HDC ReleaseDC(formMain. [in] height Fingerprint image height in pixels.image.Handle. System::Byte _tpt[]. hdc: HDC. hdc. Parameters [in] tpt Template corresponding to the raw grayscale fingerprint image supplied.height.image. // get raw image GrCapRawImageToHandle(raw. _pbPic->Image = curImage.Bitmap.com/page/pt-br/book/export/html/361 HBITMAP handle. // get raw image GrCapRawImageToHandle(_raw. int height. stdcall.image. [in] matchContext To have only the minutiae. Delphi // get screen HDC hdc := GetDC(formMain. }. width. raw. formMain. [in] rawImage A raw grayscale fingerprint image. int Res. } // release HDC ReleaseDC(HWND(NULL). // Image resolution. GR_OK is returned. ~TTemplate(void). On failure. See also Fingerprint Image Format Declaration C++ int __stdcall GrBiometricDisplay(char* tptQuery. Biometric display functions GrBiometricDisplay GrSetBiometricDisplayColors GrBiometricDisplay Returns a displayable Windows bitmap handle (HBITMAP) to the supplied raw grayscale fingerprint image with its minutiae.img.width. unsigned int width. the appropriate error code is returned. end. segments and minutiae direction drawn. height: Integer.Picture. // handle to finger image HBITMAP handle. rawImage: PChar. [in] res Fingerprint image resolution in DPI. unsigned char* rawImage. Return On success. this parameter must be the context identifier corresponding to the matching (identification or verification). // Image width. _raw.Handle).Handle := handle. To have also the macthing minutiae. __gc struct TRawImage { // Image data. Sample Code C++ // the template class __gc class TTemplate { public: // Template data.Canvas.Canvas. [in] width Fingerprint image width in pixels. int width. // Image height. Prerequisites The Fingerprint SDK library must have been previously initialized. int matchContext). var handle: HBITMAP. image. Parameters [in] minutiaeColor Minutiae color in BGR 24-bits format.width. the appropriate error code is returned. end. [in] directionsMatchedColor Matching minutiae direction color in BGR 24-bits format. stdcall. _raw.raw. See also Color Coding Format Declaration C++ int __stdcall GrSetBiometricDisplayColors(int minutiaeColors. Delphi 28 of 63 3/4/2009 14:33 . GrSetBiometricDisplayColors(minutiaeColor.width. int directionMatchedColors). } // release HDC ReleaseDC(HWND(NULL). segments and minutiae direction. // get image with biometric info GrBiometricDisplay((char *)_tpt->_tpt. _raw.Repaint(). directionColors. int directionsMatchColor = GR_IMAGE_NO_COLOR. [in] segmentsMatchedColor Matching segments color in BGR 24-bits format.raw. [in] directionsColor Minutiae direction color in BGR 24-bits format. hdc. minutia direction or matching minutia direction) not being drawn. // get image with biometric info GrBiometricDisplay(template.handle. Return On success. int segmentMatchedColors. matching minutia. context) // draw image on picture box if handle <> 0 then begin formMain. formMain. handle.Picture. // draw image on picture box if (handle != NULL) { Image *curImage = System::Drawing::Image::FromHbitmap(handle). ID (if retrieved from DB) Integer. matching segment. GR_OK is returned. img: OleVariant. [in] minutiaeMatchedColor Matching minutiae color in BGR 24-bits format. Remarks Passing GR_IMAGE_NO_COLOR as any color causes the corresponding feature (minutia.image. matching segments.Res. // don't display any other biometric info int segmentsColor = GR_IMAGE_NO_COLOR. begin // get screen HDC hdc := GetDC(formMain. segmentsMatchColor.image.image. // Image width. context).img. // Image resolution. // Image height. _raw.Canvas. hdc). Sample Code C++ // set minutiae colors to red int minutiaeColor=Color::Red. hdc. On failure. // Define a type to TTemplate = class public // Template tpt: // Template size: // Template id: temporary storage of template data. minutiae directions and matching minutiae directions in the bitmap returned by the GrBiometricDisplay function. segmentMatchedColors. matching minutiae. raw. segment. end. PSafeArray. [in] segmentsColor Segments color in BGR 24-bits format. blue for minutiae direction and magenta for matching minutiae. segments. hdc). Passing all colors as GR_IMAGE_NO_COLOR causes the default colors to be used: red for minutiae.tpt. Prerequisites The Fingerprint SDK library must have been previously initialized. size Integer. int directionsColor = GR_IMAGE_NO_COLOR. int directionColors.Canvas. directionsColor. _raw.Fingerprint SDK 2009 Developer's Manual http://www. raw.Bitmap.com/page/pt-br/book/export/html/361 HDC hdc = GetDC(0).Res. int segmentColors. TRawImage = record // Image data.Handle). // release screen HDC ReleaseDC(formMain. int segmentsMatchColor = GR_IMAGE_NO_COLOR. Res: Integer.griaulebiometrics.Handle. Delphi function GrSetBiometricDisplayColors (minutiaeColors.height. directionMatchedColors: Integer): Integer. int minutiaeMatchColor=Color::Red. minutiaeMatchedColors. minutiaeMatchColor. Delphi type // Raw image data type. segmentsColor. segmentColors.img. _pbPic->Image = curImage. width: Integer. End GrSetBiometricDisplayColors Sets the colors used to draw the minutiae.Handle := handle. int minutiaeMatchedColors. Height: Integer. directionsMatchColor).height. green for segments. end. 3/4/2009 14:33 . GrSetBiometricDisplayColors(minutiaeColor. // don't display any other biometric info segmentsColor := GR_IMAGE_NO_COLOR. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. directionsMatchColor: Integer. GR_OK is returned. Application. minorVersion: PChar): Integer.'). unsigned char* minorVersion). stdcall. Return On success. segmentsMatchColor := GR_IMAGE_NO_COLOR. begin // set minutiae colors to red minutiaeColor := clRed. On failure. Prerequisites The template array must be already allocated. begin result := GrGetGrFingerVersion(majorVersion. Delphi Function GrGetGrFingerVersion(majorVersion. Parameters 29 of 63 [in] encodedBuffer The template to be decoded. minutiaeMatchColor: Integer. &minorVersion). minorVersion). Return On success. segmentsColor. [out] minorVersion The Fingerprint SDK minor version.Fingerprint SDK 2009 Developer's Manual http://www. else if(result == GRFINGER_LIGHT) vStr = new String("VERIFICATION"). if (result == GRFINGER_FULL) vStr = new String("IDENTIFICATION"). the appropriate error code is returned. the appropriate error code is returned. segmentsMatchColor. If result = GRFINGER_FULL Then vStr := 'IDENTIFICATION'. Parameters [out] majorVersion The Fingerprint SDK major version. MessageBox::Show(System::String::Concat(System::String::Concat("The Fingerprint SDK DLL version is ". directionsColor.MessageBox(PChar('The Fingerprint SDK DLL version is ' + intToStr(majorVersion) + '. Other functions GrGetGrFingerVersion GrDecodeBase64 GrEncodeBase64 GrInstallLicense GrIsBase64Encoding GrSetLicenseFolder GrGetGrFingerVersion Returns the Fingerprint SDK version and edition. the Fingerprint SDK type code is returned. minutiaeMatchColor. result: integer. directionsMatchColor := GR_IMAGE_NO_COLOR. If result = GRFINGER_FREE Then vStr := 'FREE'. directionsColor: Integer.' + #13#10 + 'The license type is ''' + vStr + '''. If result = GRFINGER_LIGHT Then vStr := 'VERIFICATION'. Convert::ToString(majorVersion) .com/page/pt-br/book/export/html/361 var minutiaeColor: Integer. segmentsColor: Integer. minorVersion=0. directionsMatchColor).' + intToStr(minorVersion) + '. Sample Code C++ unsigned char majorVersion=0. directionsColor := GR_IMAGE_NO_COLOR. String *vStr = new String(""). int result = GrGetGrFingerVersion(&majorVersion. segmentsMatchColor: Integer. See also Licensing constants Declaration C++ Int __stdcall GrGetGrFingerVersion(unsigned char* majorVersion. else if(result == GRFINGER_FREE) vStr = new String("FREE"). [in] encodedSize [in] The size in bytes of the supplied base64 template. System::String::C Delphi var majorVersion: byte. On failure. Convert::ToString(minorVersion)). vStr: String. Prerequisites A valid license must exist on system. ". PCh End. minorVersion: byte. minutiaeMatchColor := clRed.griaulebiometrics." . GrDecodeBase64 Decodes a Base64 template. com/page/pt-br/book/export/html/361 Declaration C++ int __stdcall GrDecodeBase64(const char* encodedBuffer. [in] bufferSize [in] The size in bytes of the supplied template. char * decodedBuffer. See also Return codes Declaration C++ int __stdcall GrInstallLicense(char *productKey). Sample Code C++ int result. the appropriate error code is returned. char * encodedBuffer. stdcall. Prerequisites The template array must be already allocated. encodedBuffer: Pchar.out] encodedSize [in] The maximum size in bytes of the byte array supplied. stdcall. GrIsBased64Encoding Verifies if a buffer is in Base64 format. On failure. var encodedSize: Integer): Integer.Fingerprint SDK 2009 Developer's Manual [out] decodedBuffer The byte array in which the decoded template will be stored. int * decodedSize). GrInstallLicense Installs a license based on the product key. Delphi function GrEncodeBase64(buffer: Pchar. var decodedSize: Integer): Integer. http://www. Parameters [in] buffer The template to be encoded.out] decodedSize [in] The maximum size in bytes of the byte array supplied. Delphi function GrDecodeBase64(encodedBuffer: Pchar. stdcall. GR_OK is returned. GR_OK is returned. decodedBuffer: Pchar. On failure. int * encodedSize). [out] encodedBuffer The byte array in which the encoded template will be stored. [in. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. [out] The size in bytes of the decoded template. Delphi ret := GrInstallLicense('XXXX-XXXX-XXXX-XXXX'). bufferSize:Integer. Return On success. [out] The size in bytes of the encoded template. encodedSize:Integer. Delphi function GrInstallLicense(productKey: String): Integer. Declaration C++ int __stdcall GrEncodeBase64(const char* buffer. False is returned. GrEncodeBase64 Encodes a template in Base64 format.griaulebiometrics. Return On success. int bufferSize. the appropriate error code is returned. Otherwise. Return True if the supplied buffer is in Base64 format. [in. Parameters 30 of 63 3/4/2009 14:33 . Parameters [in] productKey the Product Key. Prerequisites This method must be called before the initialization of the library. int encodedSize. result = GrInstallLicense("XXXX-XXXX-XXXX-XXXX"). the appropriate error code is returned. Delphi function GrIsBase64Encoding(buffer: Pchar. stdcall. GrSetLicenseFolder Sets the directory in which Fingerprint SDK must search for its runtime license file. bufferSize:Integer): Boolean.com/page/pt-br/book/export/html/361 The buffer to be verified. read "Licensing Fingerprint SDK Based Deployed Applications" section to know how Fingerprint SDK searchs for the license file. Parameters [in] idSensor The ID of the fingerprint reader that raised the event. GrCapStartCapture(idSensor. GR_UNPLUG: the fingerprint reader was unplugged from the computer. event: GRCAP_STATUS_EVENTS). See also Return codes Declaration C++ int __stdcall GrSetLicenseFolder(char *licenseFolder). stdcall. Delphi function GrSetLicenseFolder(licenseFolder: String): Integer. Return On success.Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics. Delphi GRCAP_STATUS_EVENT_PROC = Procedure(idSensor: Pchar. GRCAP_STATUS_EVENTS event). WriteEvent(idSensor. Prerequisites The capture module must have been previously initialized. GR_OK is returned. } } 31 of 63 3/4/2009 14:33 . Declaration C++ bool __stdcall GrIsBase64Encoding(const char* buffer. Parameters [in] licenseFolder the directory where the Fingerprint SDK runtime license file is located. [in] buffer [in] bufferSize The size in bytes of the supplied buffer. myFingerCallBack. The event raised by the fingerprint reader: [in] event GR_PLUG: the fingerprint reader was plugged into the computer. myImageCallBack). GRCAP_STATUS_EVENTS event) { // Signaling that a Status Event occurred. At least one fingerprint reader must be connected and working. Please. Declaration C++ typedef void CALLBACK GRCAP_STATUS_EVENT_PROC(char* idSensor. This callback function is called whenever a fingerprint reader is plugged in or unplugged from the computer. if (event == GR_PLUG) { // Start capturing from the plugged reader. stdcall. Callback handlers GRCAP_STATUS_EVENT_PROC GRCAP_FINGER_EVENT_PROC GRCAP_IMAGE_EVENT_PROC GRCAP_STATUS_EVENT_PROC Callback function responsible for handling the status events. int bufferSize). Prerequisites This method must be called before the initialization of the library. event). } else if (event == GR_UNPLUG) { // Stop capturing from the unplugged reader GrCapStopCapture(idSensor). Delphi ret := GrSetLicenseFolder('C:\\FingerprintSDKLicenseFolder'). result = GrSetLicenseFolder("C:\\FingerprintSDKLicenseFolder"). Sample Code C++ int result. Sample Code C++ void StatusEventHandler(char* idSensor. This is an optional function. On failure. GR_IMAGE). height: Integer. int res). Begin // Just signals that a finger event occurred. Prerequisites The capture module must have been previously initialized. unsigned int width.Res = res. WriteEvent(idSensor. WriteEvent(idSensor. event). Procedure FingerCallback(idSensor: Pchar. int res) { // Copying acquired image memcpy(_raw. Fingerprint image resolution in DPI. rawImage: PChar. [in] rawImage The raw grayscale fingerprint image. @ImageCallback) else if (event = GR_UNPLUG) then // Stop capturing from the unplugged reader. Sample Code C++ void FingerEventHandler(char* idSensor. At least one fingerprint reader started capturing fingerprint images. Delphi GRCAP_FINGER_EVENT_PROC = Procedure(idSensor: Pchar. stdcall. width: Integer.width = width.Fingerprint SDK 2009 Developer's Manual http://www. } Delphi // This Function is called every time a finger is placed or removed //from reader. This callback function is called whenever a fingerprint image is acquired from a plugged fingerprint reader. _raw. event). event: GRCAP_STATUS_EVENTS). This callback function is called whenever a finger is placed over or removed from a plugged fingerprint reader. Parameters [in] idSensor The ID of the fingerprint reader that raised the event. event). GRCAP_FINGER_EVENTS event). GRCAP_FINGER_EVENTS event) { // Just signals that a finger event occurred. stdcall. End. Sample Code C++ void ImageEventHandler(char* idSensor. end. GRCAP_IMAGE_EVENT_PROC Callback function responsible for handling the image event. unsigned int height. Declaration C++ typedef void CALLBACK GRCAP_FINGER_EVENT_PROC(char* idSensor. Prerequisites The capture module must have been previously initialized. unsigned int height. unsigned int width. GR_FINGER_UP: a finger was removed from the fingerprint reader. rawImage. WriteEvent(idSensor. if (event = GR_PLUG) then // Start capturing from the plugged reader. At least one fingerprint reader started capturing fingerprint images. res: Integer). GrCapStopCapture(idSensor). The event raised by the fingerprint reader: [in] event GR_FINGER_DOWN: a finger was placed over the fingerprint reader. width*height).com/page/pt-br/book/export/html/361 Delphi Procedure StatusCallback(idSensor: Pchar. GRCAP_FINGER_EVENT_PROC Callback function responsible for handling the finger events. 32 of 63 3/4/2009 14:33 . Delphi GRCAP_IMAGE_EVENT_PROC = Procedure(idSensor: PChar. _raw. _raw. [in] height Fingerprint image height in pixels. begin // Signals that a status event occurred. event: GRCAP_FINGER_EVENTS). unsigned char* rawImage. [in] res See also Fingerprint Image Format Declaration C++ typedef void CALLBACK GRCAP_IMAGE_EVENT_PROC(char* idSensor. stdcall. WriteEvent(idSensor.height = height.img. Parameters [in] idSensor The ID of the fingerprint reader that raised the event. unsigned char* rawImage. event: GRCAP_FINGER_EVENTS). @FingerCallback. // Checking if the event raised is a plug or unplug. GrCapStartCapture(idSensor.griaulebiometrics. // Signaling that an Image Event occurred. stdcall. [in] width Fingerprint image width in pixels. com/page/pt-br/book/export/html/361 // display the fingerprint image PrintBiometricDisplay(false. out int quality. raw. ref Array tpt. VB6 Function Enroll (ByRef RawImage As Variant. // Display the fingerprint image PrintBiometricDisplay(false. ref int tptSize. GR_IMAGE). ref byte[] tpt. imageHeight: Integer. ref int tptSize. GR_DEFAULT_CONTEXT). Parameters [in] rawImage A raw grayscale fingerprint image. int height. // Signaling that an Image Event occurred. [out] quality The template quality. Begin // Copying acquired image raw. int res. [in] context Context in which the enrollment will be performed.img^.height := imageHeight. imageWidth*imageHeight). The recommended size is GR_MAX_SIZE_TEMPLATE bytes. rawImage: PChar. int context). int width.griaulebiometrics. int context).Fingerprint SDK 2009 Developer's Manual http://www. [in. Move(rawImage^. imageWidth: Integer. On failure. int tptFormat. WriteEvent(idSensor. The template array must be already allocated. raw. int width. the appropriate error code is returned. res: Integer). [in] width Fingerprint image width in pixels.res := res.width := imageWidth. ByRef tptSize As Long. [in] res Fingerprint image resolution in DPI.NET 33 of 63 3/4/2009 14:33 . ByRef quality As L VB . On success. Declaration C++ . Fingerprint SDK ActiveX Reference Guide All return codes and constants presented in the Return Codes and Constants section are contained in the GRConstants Type. raw. [out] The size in bytes of the extracted template. C# int Enroll (ref object RawImage. Initialization and finalization methods Matching methods Extraction methods Capture methods Enrollment Methods Biometric display methods Other methods Events Enrollment Methods Enroll StartEnroll Enroll Enrolls a fingerprint image. out int quality. int height. [in] tptFormat The template format to be used. } Delphi Procedure ImageCallback(idSensor: PChar. [in] height Fingerprint image height in pixels. All methods and events are contained in the GrFingerXCtrl Class. GR_DEFAULT_CONTEXT). int tptFormat. ByRef tpt() As Byte.out] tptSize [in] The maximum size in bytes of the byte array supplied. ByVal width As Long. [out] tpt The byte array in which the fingerprint template will be stored. ByVal tptFormat As Long. ByVal res As Long. the enroll quality code is returned.NET int Enroll (ref object RawImage. ByVal height As Long. Prerequisites Return The Fingerprint SDK library must have been previously initialized. end. stdcall. int res. The fingerprint templates are consolidated to create a trustable one. var tptSize: integer. ByVal width As Integer. res: integer. Declaration C++ .Initialize(). context: integer): StartEnroll Starts the enrollment process. the appropriate error code is returned. var tpt: PSafeArray. Sample Code C++ . 34 of 63 3/4/2009 14:33 .Fingerprint SDK 2009 Developer's Manual http://www. VB6 Function StartEnroll (ByVal context As Long) As Long VB .NET Function Initialize () As integer Delphi function Initialize: integer. Return On success. tptFormat: integer. ByVal res As Integer. Prerequisites A valid license must exist on system. Prerequisites The Fingerprint SDK library must have been previously initialized. C# GRConstants result.NET Function StartEnroll (ByVal context As Integer) As Integer Delphi function StartEnroll(context: integer): integer. ByVal height As Integer.NET // Initialize the GrFingerX Library int err = _grfingerx->Initialize(). height: integer.NET int Initialize().Initialize(). GR_OK is returned. //Initialize the library result = (GRConstants)_grfingerx.NET ' Initializing the library Dim err As integer err = _GrFingerX. On failure. VB6 Function Initialize () As Long VB .griaulebiometrics. width: integer.Initialize() Delphi var err: integer. Initialization and finalization methods Initialize Finalize CreateContext DestroyContext Initialize Initializes the Fingerprint SDK library.On failure. begin // Initializing the library. Declaration C++ .com/page/pt-br/book/export/html/361 Function Enroll (ByRef RawImage As Object. VB6 ' Initializing the library Dim err As Long err = GrFingerXCtrl1. ByRef tptSize As Integer. C# int StartEnroll (int context).NET int StartEnroll (int context). ByVal tptFormat As Long. var quality: integer. Parameters [in] context Context in which the enrollment will be started. GR_OK is returned. C# int Initialize(). ByRef qu Delphi function Enroll(var rawimage: OleVariant. ByRef tpt As Array. creates the default context and checks for a valid license on system. end. the appropriate error code is returned.Initialize VB . Return On success. err := GrFingerXCtrl1. NET Function CreateContext(ByRef contextId As integer) As integer Delphi function CreateContext(var contextId: integer): integer. the appropriate error code is returned.NET _grfingerx->Finalize(). C# int Finalize(). C# int CreateContext(ref int contextId).griaulebiometrics. On failure.CreateContext(myContextId) VB . C# _grfingerx. Sample Code C++ .Finalize() Delphi GrFingerXCtrl1.NET Dim myContextId As integer retVal=_GrFingerX. GR_OK is returned. On failure. Return On success.com/page/pt-br/book/export/html/361 Finalize Finalizes the Fingerprint SDK library. int retVal=_grfingerx->CreateContext(myContextId). verification and identification may be performed.Fingerprint SDK 2009 Developer's Manual http://www. CreateContext Creates a context in which extraction.NET int CreateContext(ref int contextId).Finalize().CreateContext(myContextId) Delphi 35 of 63 3/4/2009 14:33 .NET _GrFingerX. Parameters [out] contextId The identifier of the newly created context. Declaration C++ . VB6 Dim myContextId As Long retVal=GrFingerXCtrl1.NET Function Finalize() As integer Delphi function Finalize: integer. Sample Code C++ . VB6 Function CreateContext(ByRef contextId As Long) As Long VB . VB6 Function Finalize() As Long VB .Finalize VB . the appropriate error code is returned. Prerequisites The Fingerprint SDK library must have been previously initialized.NET int Finalize(). GR_OK is returned.Finalize(). freeing any resource used. VB6 GrFingerXCtrl1.NET int myContextId=0. C# int myContextId=0. int retVal=_grfingerx. Return On success. Declaration C++ . Prerequisites The Fingerprint SDK library must have been previously initialized.CreateContext(myContextId). C# int DestroyContext(int contextId). Return On success. C# int retVal=_grfingerx.DestroyContext(myContextId). the appropriate error code is returned.DestroyContext(myContextId) VB . Parameters [in] queryTemplate Query template to be verified. GR_OK is returned. Sample Code C++ . the appropriate error code is returned.NET Function DestroyContext(ByVal contextId As integer) As integer Delphi Function DestroyContext(contextId: integer): integer. [in] context Context in which the verification will be performed. DestroyContext Destroys a context.DestroyContext(myContextId). [in] referenceTemplate Reference template for verification.NET int retVal=_grfingerx->DestroyContext(myContextId). Parameters [in] contextId The identifier of the context to be destroyed.NET int DestroyContext(int contextId). otherwise GR_NOT_MATCH is returned.com/page/pt-br/book/export/html/361 retVal:=GrFingerXCtrl1. Return On success. VB6 retVal=GrFingerXCtrl1. Prerequisites The Fingerprint SDK library must have been previously initialized. ref int verifyScore. int context) C# int Verify(ref Array queryTemplate.NET retVal=_GrFingerX.DestroyContext(myContextId) Delphi retVal:=GrFingerXCtrl1. Prerequisites The Fingerprint SDK library must have been previously initialized.Fingerprint SDK 2009 Developer's Manual http://www. int context) 36 of 63 3/4/2009 14:33 . GR_MATCH is returned if the matching score is higher than the verification threshold. Matching methods Verify IdentifyPrepare Identify SetIdentifyParameters SetVerifyParameters GetIdentifyParameters GetVerifyParameters Verify Performs a verification by comparing the two templates supplied. ref int verifyScore.CreateContext(contextId). VB6 Function DestroyContext (ByVal contextId As Long) As Long VB .NET int Verify(ref byte[] queryTemplate. See also Return codes Declaration C++ . On failure.griaulebiometrics. ref byte[] referenceTemplate. [out] verifyScore Verification matching score. ref Array referenceTemplate. Declaration C++ . On failure. } // Comparing the templates.tpt.ref tptRef. If Not (TemplateIsValid()) Then Return ERR_INVALID_TEMPLATE ' Getting the template with the supplied ID from the database. Return _GrFingerX. score. tpt = DB.griaulebiometrics. ref score. ByRef referenceTemplate As Array.getTemplate(id). (int)GRConstants. C# public class TTemplate { // Template data. context: integer): integer.tpt. ByVal context As Long) As Long VB .NET C++ . If UBound(tpt) = 0 Then Verify = ERR_INVALID_ID Exit Function End If ' Comparing the templates. tptRef = _DB->getTemplate(id).Fingerprint SDK 2009 Developer's Manual http://www. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte ' Template size Public Size As Long End Class Dim ret As integer Dim tptref As Byte() ' Checking if the template is valid._tpt.GR_MAX_SIZE_TEMPLATE]. Verify = GrFingerXCtrl1.Verify(ref _tpt. // Template size public int _size.Verify(template. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. _size = 0. GR_DEFAULT_CONTEXT) VB . var referenceTemplate: PSafeArray. VB6 ' Template data Type Public Type TTemplate ' Template data tpt() As Byte ' Template size Size As Long End Type Dim tpt() As Byte ' Checking if the template is valid. // Checking if the template is valid. tptref = DB.Length = 0 Then Return ERR_INVALID_ID ' Comparing the templates. // Template size public int _size. If tptref.getTemplate(id) ' Checking if the ID was found. score. Sample Code C++ . public Array _tpt. _size = 0.NET: public class TTemplate { // Template data. If Not TemplateIsValid() Then Verify = ERR_INVALID_TEMPLATE Exit Function End If ' Getting the template with the supplied ID from the database. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE._tpt. tptref.GR_DEFAULT_CONTEXT) Delphi type // Class TTemplate // Define a type to temporary storage of template TTemplate = class public // Template data. GR_DEFAULT_CONTEXT). &tptRef->_tpt. } } TTemplate tptRef.GRConstants.Verify(template. ByRef verifyScore As integer. if ((tptRef->_tpt == NULL) || (tptRef->_size == 0)){ return ERR_INVALID_ID. ByVal context As integer) As integer Delphi function Verify(var queryTemplate: PSafeArray._size == 0)) { return ERR_INVALID_ID. public Array _tpt. int result. result = _grfingerx->Verify(&_tpt->_tpt.NET Function Verify (ByRef queryTemplate As Array. tpt: PSafeArray. // Checking if the ID was found. return (int) _grfingerx. // Getting the template with the supplied ID from the database. ByRef referenceTemplate() As Byte.NET ' Template data Public Class TTemplate ' Template itself Public tpt(GrFingerXLib. if ((tptRef. tpt.getTemplate(id) ' Checking if the ID was found. ByRef verifyScore As Long. score. GRConstants. // Checking if the ID was found. } } TTemplate *tptRef. // Getting the template with the supplied ID from the database. return result. // Checking if the template is valid. } // Comparing the templates.GR_DEFAULT_CONTEXT). public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants._tpt==null) || (tptRef. 37 of 63 3/4/2009 14:33 .GR_MAX_SIZE_TEMPLATE].com/page/pt-br/book/export/html/361 VB6 Function Verify (ByRef queryTemplate() As Byte. var verifyScore: integer. tptRef = _DB. getTemplate(id). ByVal context As integer) As integer Delphi function IdentifyPrepare(var templateQuery: PSafeArray. // error? if(result < 0) return result. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. end. tptRef. } } int result. Declaration C++ . result = _grfingerx->Identify(&tptRef->_tpt.GR_MAX_SIZE_TEMPLATE]. [in] context Context in which the identification will be performed.size <= 0)) then begin Verify := ERR_INVALID_ID.griaulebiometrics. Parameters [in] templateQuery Query template to be identified. public Array _tpt. Prerequisites The Fingerprint SDK library must have been previously initialized.tpt.tpt = nil) or (tptRef. &score. IdentifyPrepare Prepares a query template to be identified against one or more reference templates.NET int IdentifyPrepare (ref byte[] templateQuery. if ((tptRef. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. Sample Code C++ . // Getting the current template from the recordset. exit. Return On success. } C# public class TTemplate { // Template data. result = _grfingerx->IdentifyPrepare(&_tpt->_tpt. On failure. 38 of 63 3/4/2009 14:33 . tptRef := DB. // Template size public int _size. public Array _tpt. GR_OK is returned. tptRef: TTemplate. int context) C# int IdentifyPrepare (ref Array templateQuery. if(result == GR_MATCH){ id = _DB->getId(rs). // Checking if the query template and the reference template match. // Comparing the templates.NET Function IdentifyPrepare (ByRef templateQuery() As Array. rs->Close(). the appropriate error code is returned. return id. // Starting the identification process and supplying the query template. // Template size public int _size. Begin // Checking if the template is valid. tptRef = _DB->getTemplate(rs). OleDbDataReader *rs. id. exit.Verify(template.GR_MAX_SIZE_TEMPLATE]. GR_DEFAULT_CONTEXT). GR_DEFAULT_CONTEXT).Fingerprint SDK 2009 Developer's Manual // Template size: // Template id: http://www. if not(TemplateIsValid()) then begin Verify := ERR_INVALID_TEMPLATE. GR_DEFAULT_CONTEXT). // Allocates space to template constructor Create. Verify := GrFingerXCtrl1. ID (if retrieved from DB) Integer. // clean-up destructor Destroy. Var ret: integer. int context) VB6 Function IdentifyPrepare (ByRef templateQuery() As Byte.NET public class TTemplate { // Template data. // Comparing the current template.tpt. return result. score. // Checking if the template is valid. end. _size = 0. override. end. ByVal context As Long) As Long VB . context: integer): integer. end. TTemplate *tptRef. // Getting the template with the supplied ID from the database. } else if (result < 0){ rs->Close(). if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE.com/page/pt-br/book/export/html/361 size Integer. Fingerprint SDK 2009 Developer's Manual http://www. tpt = rs("template") ' Comparing the current template. // Getting the current template from the recordset. end 39 of 63 3/4/2009 14:33 . GRConstants.Identify(tptRef. // Template size size: Integer. end. GR_DEFAULT_CONTEXT) ' error? If ret < 0 Then Identify = ret Exit Function End If ' Getting the current template from the recordset. end. If ret = GR_MATCH Then Identify = rs("ID") rs.tpt.IdentifyPrepare(template.IdentifyPrepare(template. // error? if (result < 0) return (int)result. Begin // Checking if the template is valid. (int)GRConstants. exit.Identify(templates(i). // Checking if the template is valid. exit.IdentifyPrepare(ref _tpt. tpt: PSafeArray. result = (GRConstants) _grfingerx. If ret = GRConstants.tpt.tpt. // Template ID (if retrieved from DB) id: Integer.tpt. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. } else if (result < 0){ rs->Close(). If Not TemplateIsValid() Then Return ERR_INVALID_TEMPLATE ' Starting the identification process and supplying the query template. &score. ret := GrFingerXCtrl1. rs->Close().griaulebiometrics.tpt. int id. // Allocates space to template constructor Create.Close Exit Function ElseIf ret < 0 Then Identify = ret Exit Function End If VB . ret = _GrFingerX. score. TTemplate tptRef. ret = GrFingerXCtrl1.ID End If If ret < 0 Then Return ret Delphi type // Class TTemplate // Define a type to temporary storage of template TTemplate = class public // Template data. end.IdentifyPrepare(template.GR_DEFAULT_CONTEXT) ' error? If ret < 0 Then Return ret ' Comparing the current template.NET ' Template data Public Class TTemplate ' Template itself Public tpt(GrFingerXLib. if(result == GR_MATCH){ id = _DB->getId(rs). override. // error? if (ret < 0) then begin identify := ret. ' Starting the identification process and supplying the query 'template.GR_DEFAULT_CONTEXT). tptRef = _DB->getTemplate(rs). // Comparing the current template. score._tpt. } VB6 ' Template data Type Public Type TTemplate ' Template data tpt() As Byte ' Template size Size As Long End Type Dim ret As integer Dim i As integer ' Starting the identification process and supplying the query If Not TemplateIsValid() Then Identify = ERR_INVALID_TEMPLATE Exit Function End If 'template. ret := GrFingerXCtrl1. } } GRConstants result.GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match. // Checking if the query template and the reference template match. GR_DEFAULT_CONTEXT). ret = GrFingerXCtrl1. // Starting the identification process and supplying the query //template. GR_DEFAULT_CONTEXT). // Checking if the query template and the reference template match. // Starting the identification process and supplying the query //template. // Comparing the current template. score.Identify(tpt. return id. exit.GR_MATCH Then Return templates(i).id. result = _grfingerx->Identify(&tptRef->_tpt. if (ret = GR_MATCH) then begin Identify := tptRef.com/page/pt-br/book/export/html/361 _size = 0. GRConstants. return result. if not(TemplateIsValid())then begin Identify := ERR_INVALID_TEMPLATE.GR_MAX_SIZE_TEMPLATE) As Byte ' Template size Public Size As Long End Class Dim ret As integer Dim i As integer ' Checking if the template is valid.template. GR_DEFAULT_CONTEXT). GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match. ret = _GrFingerX.GRConstants. OleDbDataReader rs. // clean-up destructor Destroy. NET public class TTemplate { // Template data. _size = 0. end.griaulebiometrics. // Comparing the current template. Parameters [in] templateReference Reference template for identification. tptRef = _DB->getTemplate(rs). ByRef identifyScore As Long. result = _grfingerx->IdentifyPrepare(&_tpt->_tpt. &score. ByVal context As integer) As integer Delphi function Identify(var templateReference: PSafeArray. // Getting the current template from the recordset. OleDbDataReader *rs. public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants. if(result == GR_MATCH){ id = _DB->getId(rs). return id. rs->Close(). public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants.NET int Identify (ref byte[] templateReference. // Checking if the query template and the reference template match. Prerequisites The identification must be previously prepared by calling the IdentifyPrepare method. // Checking if the template is valid. The Fingerprint SDK library must have been previously initialized. On failure. GR_DEFAULT_CONTEXT). } C# public class TTemplate { // Template data. GR_DEFAULT_CONTEXT). // error? if(result < 0) return result. end Identify Performs an identification by comparing the supplied reference template against the previously prepared query template. public Array _tpt. int context) VB6 Function Identify (ByRef templateReference() As Byte.NET Function Identify (ByRef templateReference As Array. // Template size public int _size. 40 of 63 3/4/2009 14:33 . ByVal context As Long) As Long VB . GR_MATCH is returned if the matching score is higher than the identification threshold. ref int identifyScore. return result. context: integer): integer. [out] identifyScore Identification matching score.com/page/pt-br/book/export/html/361 else if (ret < 0) then begin Identify := ret. ref int identifyScore.Fingerprint SDK 2009 Developer's Manual http://www.GR_MAX_SIZE_TEMPLATE]. ByRef identifyScore As integer. } else if (result < 0){ rs->Close(). Sample Code C++ . result = _grfingerx->Identify(&tptRef->_tpt. // Starting the identification process and supplying the query template. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. See also Return codes Declaration C++ . otherwise GR_NOT_MATCH is returned. OleDbDataReader rs. if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE. TTemplate *tptRef. _size = 0. the appropriate error code is returned. } } int result. id. int id. int context) C# int Identify (ref Array templateReference. [in] context Context in which the identification will be performed. // Checking if the template is valid. public Array _tpt. } } GRConstants result. // Starting the identification process and supplying the query //template. The Verify method must not be called beween the call to IdentifyPrepare method and a call to Identify method. var identifyScore: integer. // Template size public int _size. TTemplate tptRef.GR_MAX_SIZE_TEMPLATE]. Return On success. exit. result = _grfingerx->Identify(&tptRef->_tpt.NET ' Template data Public Class TTemplate ' Template itself Public tpt(GrFingerXLib.id. tpt: PSafeArray.Identify(tpt._tpt. if (ret = GR_MATCH) then begin Identify := tptRef. GR_DEFAULT_CONTEXT). } VB6 ' Template data Type Public Type TTemplate ' Template data tpt() As Byte ' Template size Size As Long End Type Dim ret As integer Dim i As integer ' Starting the identification process and supplying the query If Not TemplateIsValid() Then Identify = ERR_INVALID_TEMPLATE Exit Function End If 'template. ret = GrFingerXCtrl1.ID End If If ret < 0 Then Return ret Delphi type // Class TTemplate // Define a type to temporary storage of template TTemplate = class public // Template data.GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match.GR_DEFAULT_CONTEXT). // Comparing the current template. If ret = GR_MATCH Then Identify = rs("ID") rs.griaulebiometrics. GR_DEFAULT_CONTEXT).tpt. GR_DEFAULT_CONTEXT) ' error? If ret < 0 Then Identify = ret Exit Function End If ' Getting the current template from the recordset.Fingerprint SDK 2009 Developer's Manual http://www.tpt.Close Exit Function ElseIf ret < 0 Then Identify = ret Exit Function End If VB . tpt = rs("template") ' Comparing the current template.Identify(templates(i). // Getting the current template from the recordset. // Comparing the current template.GR_MATCH Then Return templates(i). (int)GRConstants. return id.Identify(tptRef. // error? if (result < 0) return (int)result. ret = GrFingerXCtrl1. GR_DEFAULT_CONTEXT). // clean-up destructor Destroy.template. exit. If ret = GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte ' Template size Public Size As Long End Class Dim ret As integer Dim i As integer ' Checking if the template is valid. if not(TemplateIsValid())then begin Identify := ERR_INVALID_TEMPLATE. // Starting the identification process and supplying the query //template.GR_DEFAULT_CONTEXT) ' error? If ret < 0 Then Return ret ' Comparing the current template. GRConstants. score. // Allocates space to template constructor Create. // Template ID (if retrieved from DB) id: Integer. ret = _GrFingerX. ret := GrFingerXCtrl1. end. If Not TemplateIsValid() Then Return ERR_INVALID_TEMPLATE ' Starting the identification process and supplying the query template. exit.IdentifyPrepare(ref _tpt. ret = _GrFingerX. // error? if (ret < 0) then begin identify := ret.GRConstants. &score. Begin // Checking if the template is valid. // Template size size: Integer. GRConstants. end. if(result == GR_MATCH){ id = _DB->getId(rs).IdentifyPrepare(template. ret := GrFingerXCtrl1.IdentifyPrepare(template. end else if (ret < 0) then begin Identify := ret. end. score.tpt. end SetIdentifyParameters 41 of 63 3/4/2009 14:33 . exit. // Checking if the query template and the reference template match. GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match. rs->Close(). // Checking if the query template and the reference template match.tpt. override. exit. ' Starting the identification process and supplying the query 'template. } else if (result < 0){ rs->Close().tpt. end.com/page/pt-br/book/export/html/361 result = (GRConstants) _grfingerx. tptRef = _DB->getTemplate(rs). score.IdentifyPrepare(template. return result. int context) C# int SetIdentifyParameters (int identifyThreshold. rotationMaxId. } C# ret = axGrFingerXCtrl1.NET int SetIdentifyParameters (int identifyThreshold. Default values will be used. On failure.GR_DEFAULT_USED Then MsgBox("Invalid identify parameters values. Default values will be used.SetIdentifyParameters(thresholdId. its default value will be used and GR_DEFAULT_USED is returned. [in] context Context in which the identification parameters will be set. ByVal identifyRotationTolerance As Long. Default values will be used. [in] verifyRotationTolerance The rotation tolerance for the verification process.Fingerprint SDK 2009 Developer's Manual http://www. [in] identifyRotationTolerance The rotation tolerance for the identification process. Parameters [in] identifyThreshold The identification score threshold.GR_DEFAULT_CONTEXT). Default values will be used. GR_OK is returned.NET ret = axGrFingerXCtrl2->SetIdentifyParameters(thresholdId.Show("Invalid identify parameters values. } VB6 ret = GrFingerXCtrl1. rotationMaxId.NET Function SetIdentifyParameters (ByVal identifyThreshold As integer. end. rotationMaxId. // error? if ((GRConstants)ret == GRConstants.").") End If Delphi ret := GrFingerXCtrl1. rotationMaxId. int identifyRotationTolerance. On failure. Return If any supplied parameter is invalid or out of range. GR_OK is returned. int identifyRotationTolerance.griaulebiometrics. ByVal context As integer) As integer Delphi function SetIdentifyParameters(identifyThreshold: integer. // error? if ret = GR_DEFAULT_USED then begin showmessage('Invalid identify parameters values. GR_DEFAULT_CONTEXT).SetIdentifyParameters(thresholdId.com/page/pt-br/book/export/html/361 Sets the identification parameters in the supplied context. (int)GRConstants. 3/4/2009 14:33 ."). Prerequisites The Fingerprint SDK library must have been previously initialized.GR_DEFAULT_CONTEXT) ' error? If ret = GRConstants. On success. See also Matching constants Context constants Declaration C++ . GR_DEFAULT_CONTEXT) ' error? If ret = GR_DEFAULT_USED Then MsgBox ("Invalid identify parameters values. Return If any supplied parameter is invalid or out of range.GR_DEFAULT_USED) { MessageBox. identifyRotationTolerance: integer. the appropriate error code is returned. Sample Code C++ .NET ret = AxGrFingerXCtrl1. On success. ByVal identifyRotationTolerance As integer. ByVal context As Long) As Long VB .SetIdentifyParameters(thresholdId. Prerequisites The Fingerprint SDK library must have been previously initialized. rotationMaxId.") End If VB . [in] context 42 of 63 Context in which the verification parameters will be set.'). int context) VB6 Function SetIdentifyParameters (ByVal identifyThreshold As Long. Parameters [in] verifyThreshold The verification score threshold. its default value will be used and GR_DEFAULT_USED is returned. Default values will be used. the appropriate error code is returned. // error? if (ret == GR_DEFAULT_USED) { MessageBox::Show("Invalid identify parameters values. context: integer): integer. GRConstants. GR_DEFAULT_CONTEXT). SetVerifyParameters Sets the verification parameters in the supplied context.SetIdentifyParameters(thresholdId. Sample Code C++ .'). int context) C# int GetIdentifyParameters (ref int identifyThreshold. GR_DEFAULT_CONTEXT). the appropriate error code is returned. Default values will be used.Fingerprint SDK 2009 Developer's Manual http://www. } C# // set the new verification parameters ret = axGrFingerXCtrl1. rotationMaxVr.GR_DEFAULT_USED Then MsgBox("Invalid verify parameters values. // error? if ((GRConstants)ret == GRConstants. Return On success. rotationMaxVr. GR_DEFAULT_CONTEXT) ' error? If ret = GR_DEFAULT_USED Then MsgBox ("Invalid verify parameters values. int context) VB6 Function SetVerifyParameters (ByVal verifyThreshold As Long. ByVal context As Integer) As Integer Delphi function SetVerifyParameters(verifyThreshold: integer.NET // set the new verification parameters ret = axGrFingerXCtrl2->SetVerifyParameters(thresholdVr. GR_OK is returned. ByVal verifyRotationTolerance As Integer.griaulebiometrics.com/page/pt-br/book/export/html/361 See also Matching constants Context constants Declaration C++ . } VB6 ' set the new verification parameters ret = GrFingerXCtrl1.NET ' set the new verification parameters ret = AxGrFingerXCtrl1. (int)GRConstants. Default values will be used.SetVerifyParameters(thresholdVr. GR_DEFAULT_CONTEXT). ByRef identifyRotationTolerance As Long.").SetVerifyParameters(thresholdVr. Default values will be used. On failure. GRConstants. ByVal context As Long) As Long VB . rotationMaxVr.") End If Delphi // set the new verification parameters ret := GrFingerXCtrl1. int verifyRotationTolerance.SetVerifyParameters(thresholdVr. See also Matching constants Context constants Declaration C++ . int verifyRotationTolerance.NET Function SetVerifyParameters (ByVal verifyThreshold As Integer. rotationMaxVr.NET 43 of 63 3/4/2009 14:33 .GR_DEFAULT_CONTEXT) ' error? If ret = GRConstants. int context) C# int SetVerifyParameters (int verifyThreshold. Default values will be used. Prerequisites The Fingerprint SDK library must have been previously initialized. ref int identifyRotationTolerance. // error? if ret = GR_DEFAULT_USED then begin showmessage('Invalid verify parameters values. Parameters [out] identifyThreshold The current identification score threshold."). end.NET int SetVerifyParameters (int verifyThreshold. GetIdentifyParameters Retrieves the identification parameters for the supplied context. // error? if (ret == GR_DEFAULT_USED) { MessageBox::Show("Invalid verify parameters values. context: integer): integer. [in] context Context from which the identification parameters will be retrieved.Show("Invalid verify parameters values. ByVal context As Long) As Long VB .NET int GetIdentifyParameters (ref int identifyThreshold. ref int identifyRotationTolerance. rotationMaxVr.") End If VB . verifyRotationTolerance: integer. [out] identifyRotationTolerance The current rotation tolerance for the identification process.GR_DEFAULT_USED) { MessageBox. ByVal verifyRotationTolerance As Long.SetVerifyParameters(thresholdVr. int context) VB6 Function GetIdentifyParameters (ByRef identifyThreshold As Long. Default values will be used.GR_DEFAULT_CONTEXT). ref rotationMaxId. Sample Code C++ . var identifyRotationTolerance: integer.GR_DEFAULT_CONTEXT). ByVal context As Integer) As Integer Delphi function GetIdentifyParameters(var identifyThreshold: integer. GR_DEFAULT_CONTEXT). rotationMaxId. ByVal context As Integer) As Integer Delphi function GetVerifyParameters(var verifyThreshold: integer. rotationMaxId. (int)GRConstants. rotationMaxId.NET Function GetVerifyParameters (ByRef verifyThreshold As Integer. &rotationMaxId.GetIdentifyParameters(ref thresholdId. C# int thresholdVr = 0. context: integer): integer. ByRef verifyRotationTolerance As Integer. GR_DEFAULT_CONTEXT). axGrFingerXCtrl1.NET int thresholdId. [in] context Context from which the verification parameters will be retrieved. Prerequisites The Fingerprint SDK library must have been previously initialized. [out] verifyRotationTolerance The current rotation tolerance for the verification process. On failure. rotationMaxVr. var verifyRotationTolerance: integer. VB6 Dim thresholdId As Long Dim rotationMaxId As Long GrFingerXCtrl1. rotationMaxVr.GetIdentifyParameters(thresholdId. rotationMaxVr = 0. ByVal context As Long) As Long VB .NET Dim thresholdVr As Integer Dim rotationMaxVr As Integer GrFingerXCtrl1. rotationMaxId.GetVerifyParameters thresholdVr.GetIdentifyParameters thresholdId. GetVerifyParameters Retrieves the verification parameters for the supplied context. &rotationMaxVr. int verifyRotationTolerance. GR_OK is returned.GetIdentifyParameters thresholdId. begin GrFingerXCtrl1. thresholdId = 0. ByRef identifyRotationTolerance As Integer. ref rotationMaxVr. axGrFingerXCtrl2->GetIdentifyParameters(&thresholdId. rotationMaxId = 0.NET int GetVerifyParameters (int verifyThreshold. axGrFingerXCtrl1.Fingerprint SDK 2009 Developer's Manual http://www. rotationMaxVr. axGrFingerXCtrl2->GetVerifyParameters(&thresholdVr. context: integer): integer. C# int ret. (int)GRConstants. GR_DEFAULT_CONTEXT).GetVerifyParameters(ref thresholdVr. int context) VB6 Function GetVerifyParameters (ByRef verifyThreshold As Long. GR_DEFAULT_CONTEXT Delphi Var 44 of 63 3/4/2009 14:33 . int verifyRotationTolerance.GR_DEFAULT_CONTEXT).NET int thresholdVr. int context) C# int GetVerifyParameters (int verifyThreshold. GR_DEFAULT_CONTEXT VB . GR_DEFAULT_CONTEXT VB . VB6 Dim thresholdVr As Long Dim rotationMaxVr As Long GrFingerXCtrl1. Return On success.GetVerifyParameters thresholdVr. rotationMaxId: Integer. the appropriate error code is returned. ByRef verifyRotationTolerance As Long.NET Dim thresholdId As Integer Dim rotationMaxId As Integer GrFingerXCtrl1. Parameters [out] verifyThreshold The current verification score threshold. See also Matching constants Context constants Declaration C++ . Sample Code C++ .com/page/pt-br/book/export/html/361 Function GetIdentifyParameters (ByRef identifyThreshold As Integer. GR_DEFAULT_CONTEXT Delphi Var thresholdId : Integer.griaulebiometrics. NET Function Extract (ByRef RawImage As Object. Sample Code C++ .height. int context) C# int Extract (ref object RawImage. [in] width [in] Fingerprint image width in pixels.com/page/pt-br/book/export/html/361 thresholdVr : Integer. ByRef tpt As Array. _raw->Res. _raw. (int)GRConstants. ref Array tpt. [in] height Fingerprint image height in pixels. _raw->width. result = (int)_grfingerx._size = 0. ByVal height As Long. ByVal width As Long. &_tpt->_size. ByVal res As Integer. the appropriate error code is returned. [in] res Fingerprint image resolution in DPI._size = (int)GRConstants. Parameters [in] rawImage A raw grayscale fingerprint image. ref int tptSize. ByRef tptSize As Integer. height: integer. ByRef tptSize As Long. GR_DEFAULT_CONTEXT). // if error. set template size to 0 if (result < 0){ // Result < 0 => extraction problem _tpt->_size = 0. int context) VB6 Function Extract (ByRef RawImage As Variant. var tptSize: integer. int width. Context in which the extraction will be performed. ref _tpt. ByVal context As Long) As Long VB._tpt. _raw. var tpt: PSafeArray.GR_MAX_SIZE_TEMPLATE. // set current buffer size for the extract template _tpt.GetVerifyParameters(thresholdVr. the template quality code is returned. // set current buffer size for the extract template _tpt->_size = GR_MAX_SIZE_TEMPLATE.griaulebiometrics. End Extraction methods ConvertTemplate ExtractEx Extract Extract Extracts a fingerprint template from the supplied fingerprint raw image. ByRef tpt() As Byte. ref int tptSize.ref _tpt. } C# int result. Prerequisites The template array must be already allocated.width. int res. rotationMaxVr. int width. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. begin GrFingerXCtrl1. rotationMaxVr: Integer.NET int Extract (ref object RawImage. width: integer. The Fingerprint SDK library must have been previously initialized. [out] The size in bytes of the extracted template. int height. ByVal width As Integer. context: integer): integer.out] tptSize [in] context [in] The maximum size in bytes of the byte array supplied.Res. [in. Declaration C++. res: integer. int height. ref byte[] tpt. set template size to 0 if (result < 0) { // Result < 0 => extraction problem _tpt. On failure. [out] tpt The byte array in which the fingerprint template will be stored. GR_DEFAULT_CONTEXT). ByVal res As Long. &_tpt->_tpt.Fingerprint SDK 2009 Developer's Manual http://www. // if error. int res.img. } VB6 Dim ret As Integer ' Set initial buffer size and allocate it 45 of 63 3/4/2009 14:33 .Extract( ref _raw. _raw._size. Return On success. ByVal context As Integer) As Int DELPHI function Extract(var rawimage: OleVariant.NET int result. ByVal height As Integer. _raw->height.GR_DEFAULT_CONTEXT). result = _grfingerx->Extract(&_raw->img. ByRef tptSize As Integer. int res. 46 of 63 3/4/2009 14:33 . the template quality code is returned. raw. C# int ExtractEx (ref object RawImage. height: integer.com/page/pt-br/book/export/html/361 template. raw. raw. int context.img. ret := GrFingerXCtrl1. GR_DEFAULT_CONTEXT) ' if error. [out] tpt The byte array in which the fingerprint template will be stored. raw.size := GR_MAX_SIZE_TEMPLATE. ByVal context As Integer.Size = GR_MAX_SIZE_TEMPLATE ' reallocate template buffer ReDim Preserve template.tpt.Size) VB . ByVal width As Integer.NET Dim ret As Integer ' set current buffer size for the extract template template. ByRef tpt As Array. Return On success. ExtractEx Extracts a fingerprint template.Size = template. raw. ByVa Delphi function ExtractEx(var rawimage: OleVariant. template. ref int tptSize.NET Function ExtractEx (ByRef RawImage As Object. [in] width Fingerprint image width in pixels.height. int tptFormat). res: integer.img.width. ByRef tpt() As Byte. var tpt: PSafeArray. from the supplied fingerprint raw image.tpt(template. The recommended size is GR_MAX_SIZE_TEMPLATE bytes.width.res. ByVal width As Long. CovertTemplate Creates a copy of the specified template. The recommended size is GR_MAX_SIZE_TEMPLATE bytes.width. int height.Size. template. serialized in the specified format. Prerequisites The Fingerprint SDK library must have been previously initialized. See also Image constants Return codes Fingerprint Image Format Declaration C++ . template. width: integer.Length ret = _GrFingerX.img. Return On success. var tptSize: integer.On failure. ByVal res As Long.tpt. [in] height Fingerprint image height in pixels. int width. On failure. ByVal height As Integer.Size. [out] The size in bytes of the extracted template.tpt. template.griaulebiometrics. the appropriate error code is returned. ByVal context As Long. GR_OK is returned.Extract(raw. ref Array tpt.size := 0. the appropriate error code is returned. tptFormat: integer): integer.size.NET int ExtractEx (ref object RawImage.Size = 0 ' Set real buffer size and free unnecessary data ReDim Preserve template. GRConstants. template. int tptFormat). context: integer. ByRef tptSize As Long.height. ref byte[] tpt.Extract(raw. GR_DEFAULT_CONTEXT). [in] context Context in which the extraction will be performed. ref int tptSize.res.Extract(raw. [in] tptFormat The template format to be used. set template size to 0 ' Result < 0 => extraction problem If ret < 0 Then template.tpt. set template size to 0 // Result < 0 => extraction problem if (ret < 0 ) then template. [in] res Fingerprint image resolution in DPI. Prerequisites The Fingerprint SDK library must have been previously initialized. // if error. ByVal height As Long. int res. int width. raw.height. Begin // set current buffer size for the extract template template. VB6 Function ExtractEx (ByRef RawImage As Variant. ByVal tptFormat A VB . [in.Fingerprint SDK 2009 Developer's Manual http://www.tpt(template. set template size to 0 ' Result < 0 => extraction problem If ret < 0 Then template. raw. The template array must be already allocated. int context.Size) ret = GrFingerXCtrl1. ByVal res As Integer. in a specified format. The template array must be already allocated.out] tptSize [in] The maximum size in bytes of the byte array supplied.GR_DEFAULT_CONTEXT) ' if error.res. template. int height. raw. raw.Size = 0 DELPHI Var ret: Integer. Parameters [in] rawImage A raw grayscale fingerprint image. end. ByRef newTpt() As Byte. ByRef newTptSize As Long.NET retVal= GrFingerXCtrl1. [out] newTpt The converted template. Declaration C++ . On failure. CapFinalize 47 of 63 3/4/2009 14:33 . Return On success. [in] context Context in which the extraction will be performed.CapInitialize(). [out] The size in bytes of the converted template.NET int ConvertTemplate (ref byte[] tpt. VB6 retVal= GrFingerXCtrl1. ref Array newTpt.Fingerprint SDK 2009 Developer's Manual http://www. int context. format: integer): integer. context: integer. ref int newTptSize. ByRef newTptSize As Integer. Capture methods CapInitialize CapFinalize CapStartCapture CapStopCapture CapSaveRawImageToFile CapLoadImageFromFile CapRawImageToHandle CapInitialize Initializes the capture module.NET Function CapInitialize() As Integer Delphi Function CapInitialize(): integer. ByVal format As Integer) As Integer Delphi function ConvertTemplate(var tpt: PSafeArray. Sample Code C++ . int format).CapInitialize VB . GR_OK is returned. See also Events Declaration C++ . the appropriate error code is returned.com/page/pt-br/book/export/html/361 Parameters [in] tpt The template to convert. ByVal context As Long.CapInitialize(). VB6 Function ConvertTemplate (ByRef tpt() As Byte. int context. [in. ByVal format As Long) As Long VB . [in] format The template format to be used.out] newTptSize [in] The maximum size in bytes of the byte array supplied. C# retVal= _grfingerx.griaulebiometrics. ByVal context As Integer.NET int CapInitialize() C# int CapInitialize() VB6 Function CapInitialize() As Long VB . ref byte[] newTpt.CapInitialize Delphi retVal:= GrFingerXCtrl1. int format). var newTptSize: integer. ref int newTptSize. ByRef newTpt As Array.NET Function ConvertTemplate (ByRef tpt As Array. var newTpt: PSafeArray.NET retVal= _grfingerx->CapInitialize(). C# int ConvertTemplate (ref Array tpt. Prerequisites A valid license must exist on system. Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 Stops the capture module, freeing any resource used. Prerequisites The capture module must have been previously initialized. Return On success, GR_OK is returned. On failure, the appropriate error code is returned. Declaration C++ .NET int CapFinalize() C# int CapFinalize () VB6 Function CapFinalize () As Long VB .NET Function CapFinalize () As Integer Delphi Function CapFinalize (): integer; Sample Code C++ .NET retVal= _grfingerx->CapFinalize(); C# retVal= _grfingerx.CapFinalize(); VB6 retVal= GrFingerXCtrl1.CapFinalize VB .NET retVal= GrFingerXCtrl1.CapFinalize Delphi retVal:= GrFingerXCtrl1.CapFinalize(); CapStartCapture Starts capturing fingerprint images from the supplied fingerprint reader. Prerequisites Return The capture module must have been previously initialized. The supplied fingerprint reader must be connected, working and recognized as plugged by the capture module. On success, GR_OK is returned. On failure, the appropriate error code is returned. Parameters [in] idSensor The ID of the fingerprint reader to start capturing images from. See also Events Declaration C++ .NET int CapStartCapture (string idSensor) C# int CapStartCapture (string idSensor) VB6 Function CapStartCapture (ByVal idSensor As String) VB .NET Function CapStartCapture (ByVal idSensor As String) Delphi function CapStartCapture(const idSensor: WideString): integer; Sample Code C++ .NET axGrFingerXCtrl2->CapStartCapture(e->idSensor); C# axGrFingerXCtrl1.CapStartCapture(e.idSensor); VB6 GrFingerXCtrl1.CapStartCapture (idSensor) VB .NET AxGrFingerXCtrl1.CapStartCapture(e.idSensor) Delphi GrFingerXCtrl1.CapStartCapture (idSensor); 48 of 63 3/4/2009 14:33 Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 CapStopCapture Stops capturing fingerprint images from the supplied fingerprint reader. Prerequisites Return The capture module must have been previously initialized. Image capture must have been previously started on the supplied fingerprint reader. On success, GR_OK is returned. On failure, the appropriate error code is returned. Parameters [in] idSensor The ID of the fingerprint reader to stop capturing images from. Declaration C++ .NET int CapStopCapture (string idSensor) C# int CapStopCapture (string idSensor) VB6 Function CapStopCapture (ByVal idSensor As String) As Long VB .NET Function CapStopCapture (ByVal idSensor As String) As Integer Delphi function CapStopCapture(const idSensor: WideString): integer; Sample Code C++ .NET axGrFingerXCtrl2->CapStopCapture(e->idSensor); C# axGrFingerXCtrl1.CapStopCapture(e.idSensor); VB6 GrFingerXCtrl1.CapStopCapture (idSensor) VB .NET AxGrFingerXCtrl1.CapStopCapture(e.idSensor) Delphi GrFingerXCtrl1.CapStopCapture (idSensor); CapSaveRawImageToFile Saves a raw grayscale fingerprint image as a picture file. Prerequisites A valid license must exist on system. Return On success, GR_OK is returned. On failure, the appropriate error code is returned. Parameters [in] rawImage A raw grayscale fingerprint image. [in] width Fingerprint image width in pixels. [in] height Fingerprint image height in pixels. [in] filename The complete path and filename of the picture file to create. [in] imageFormat Picture file format. See also Fingerprint Image Format Declaration C++ .NET int CapSaveRawImageToFile (ref object RawImage, int width, int height, string filename, int imageFormat) C# int CapSaveRawImageToFile (ref Object RawImage, int width, int height, string filename, int imageFormat) VB6 Function CapSaveRawImageToFile (ByRef RawImage As Variant, ByVal width As Long, ByVal height As Long, ByVal filename As String, ByVal imageFormat As Long) As Long VB .NET Function CapSaveRawImageToFile (ByRef RawImage As Object, ByVal width As Integer, ByVal height As Integer, ByVal filename As String, ByVal imageFormat As Integer) As Integer Delphi 49 of 63 3/4/2009 14:33 Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 function CapSaveRawImageToFile(vat rawImage: OleVariant; width, height: integer; filename: WideString; imageFormat: GRCAP_IMAGE_FORMAT): integer;; Sample Code C++ .NET if (axGrFingerXCtrl2->CapSaveRawImageToFile(&_raw->img, WriteLog("Failed to save the file."); } _raw->width, _raw->height, FileName, GRCAP_IMAGE_FORMAT_BMP) != GR_OK) { C# if (axGrFingerXCtrl1.CapSaveRawImageToFile(ref _raw.img, _raw.width, _raw.height, FileName, (int)GRConstants.GRCAP_IMAGE_FORMAT_BMP) != (int)GRConstants.GR_OK) { WriteLog("Failed to save the file."); } VB6 If GrFingerXCtrl1.CapSaveRawImageToFile(raw.img, raw.width, raw.height, FileName, GRCAP_IMAGE_FORMAT_BMP) <> GR_OK Then writeLog ("Failed to save the file.") End If VB .NET If AxGrFingerXCtrl1.CapSaveRawImageToFile(raw.img, raw.width, raw.height, FileName, GRConstants.GRCAP_IMAGE_FORMAT_BMP) <> GRConstants.GR_OK Then WriteLog("Fail to save the file.") End If Delphi if GrFingerXCtrl1.CapSaveRawImageToFile(raw.img, raw.width, raw.Height, fname, GRCAP_IMAGE_FORMAT_BMP) <> GR_OK then WriteLog('Fail to save the file.'); CapLoadImageFromFile Loads a grayscale fingerprint image from a picture file. The capture module must have been previously initialized. Prerequisites Picture file must be in one of the supported formats, as defined in the section. Image capture must have been previously started on the "File" sensor. Return On success, GR_OK is returned. On failure, the appropriate error code is returned. Parameters [in] fileName The complete path and filename of the picture file to load. [in] res Image resolution in DPI. Remarks On success, an image event is fired for the "File" sensor. See also Events Declaration C++ .NET int CapLoadImageFromFile (string filename, int res) C# int CapLoadImageFromFile (string filename, int res) VB6 Function CapLoadImageFromFile (ByVal filename As String, ByVal res As Long) As Long VB .NET Function CapLoadImageFromFile (ByVal filename As String, ByVal res As Integer) As Integer Delphi function CapLoadImageFromFile(const filename: WideString; res: integer): integer; Sample Code C++ .NET // Getting the resolution. int resolution = Convert::ToInt32(InputBox::ShowModal("What is the image resolution?", "Resolution", "")); // Checking if the action was canceled, no value or an invalid value //was entered. if (resolution != 0) { axGrFingerXCtrl2->CapLoadImageFromFile(ofdImage->FileName, resolution); } C# // Getting the resolution. String res = InputBox.Show("What is the image resolution?", "Resolution", "").Text; if (!res.Equals("")) { int resolution = Convert.ToInt32(res); // Checking if the action was canceled, no value or an invalid value //was entered. if (resolution != 0) { axGrFingerXCtrl1.CapLoadImageFromFile(ofdImage.FileName, resolution); } } VB6 ' Getting the resolution. res = Val(InputBox("Enter the resolution of the selected image", "Resolution")) ' Checking if the action was canceled, no value or an invalid value was entered. If res <> 0 Then GrFingerXCtrl1.CapLoadImageFromFile CommonDialog.FileName, res End If 50 of 63 3/4/2009 14:33 end.Picture = handle End If VB ._raw. New IntPtr(handle. ByVal width As Integer.width. _grfingerx. // draw image on picture box if (handle != null) { _pbPic.CapLoadImageFromFile(OpenFileDialog1. _raw->width. &handle). hdc.Zero).IPictureDisp handler) VB6 Function CapRawImageToHandle (ByRef RawImage As Variant.CapRawImageToHandle raw.IPictureDisp = Nothing ' screen HDC Dim hdc = GetDC(0) _GrFingerX.hdc). [in] height Fingerprint image height in pixels. the appropriate error code is returned. IntPtr hdc = g->GetHdc(). int width.FileName.Zero. ref stdole.CapRawImageToHandle(raw.width. resolution) End If Delphi // Getting image resolution. // Checking if the action was canceled. ByVal height As Long. hdc: HDC. ref stdole.img. var handler: IPictureDisp): integer. ImageConverter.ToInt32(). '')). If (resolution <> 0) Then AxGrFingerXCtrl1.width. ByRef handler As IPictureDisp) As Long VB . _pbPic. int height.FileName. hdc. ByVal width As Long.CapLoadImageFromFile(OpenPictureDialog. no value or an invalid value was entered. resolution). Parameters [in] rawImage A raw grayscale fingerprint image. handle If Not (handle Is Nothing) Then img. See also Fingerprint Image Format Declaration C++ . Prerequisites A valid license must exist on system. formMain. raw. C# IPictureDisp handle = null. _grfingerx->CapRawImageToHandle(&_raw->img. ByVal hdc As Long.griaulebiometrics. On failure.height. height: integer.IntPtr. [in] width Fingerprint image width in pixels.NET Function CapRawImageToHandle (ByRef RawImage As Object. if (resolution <> 0) then begin GrFingerXCtrl1. resolution = Val(InputBox("What is the image resolution?". "Resolution".hDC.Handle). width. CapRawImageToHandle Returns a picture display handle (IPictureDisp) to the supplied raw grayscale fingerprint image.NET stdole::IPictureDisp *handle. } g->ReleaseHdc(hdc).IntPtr. int height. ByVal hdc As Integer. int width. "")) ' Checking if the action was canceled._raw. Return On success.height. ByRef handler As stdole. handle) If Not (handle Is Nothing) Then _pbPic.NET ' Getting the resolution. raw. VB6 Dim handle As IPictureDisp GrFingerXCtrl1. raw.IPictureDisp handler) C# int CapRawImageToHandle (ref Object RawImage. ByVal height As Integer. _raw->height. [out] handle The fingerprint picture display handle (IPictureDisp). ref handle). GR_OK is returned. 'Resolution'.Image = Image. _pbPic->Update(). // screen HDC Graphics *g = _btEnroll->CreateGraphics().CapRawImageToHandle(ref _raw. Sample Code C++ .NET ' handle to finger image Dim handle As stdole.IpictureToImage(handle).img.FromHbitmap(New IntPtr(handle.IPictureDisp) As Integer Delphi function CapRawImageToHandle(var rawImage: OleVariant. [in] hdc The device context handle (HDC) in which the picture will be created. no value or an invalid value was entered.height.Update().hPal)) 51 of 63 3/4/2009 14:33 . if (handle != NULL) { Image *curImage = System::Drawing::Image::FromHbitmap(handle->Handle). // screen HDC IntPtr hdc = GetDC(System.img. resolution := StrToInt(InputBox('What is the image resolution?'. _pbPic->Image = curImage.Fingerprint SDK 2009 Developer's Manual http://www. raw. hdc.ToInt32().NET int CapRawImageToHandle (ref object RawImage.Image = GrFingerXSampleCS. } ReleaseDC(System. int hdc. int hdc.com/page/pt-br/book/export/html/361 VB . int hdc. ByRef rawImage As Object. ByVal height As Integer. ByVal width As Long. // Image width. int hdc. if handle <> nil then begin SetOlePicture(image.img. }. Prerequisites The Fingerprint SDK library must have been previously initialized. TTemplate(void).Fingerprint SDK 2009 Developer's Manual http://www.Update() End If ' release screen HDC ReleaseDC(0. 52 of 63 3/4/2009 14:33 . ByVal matchContext As VB . var rawImage: OleVariant. int width. [in] width Fingerprint image width in pixels. System::Byte _tpt[]. ref stdole. the appropriate error code is returned.NET Function BiometricDisplay (ByRef tptQuery As Array. ByRef rawImage As Variant. __gc struct TRawImage { // Image data. int matchContext) C# int BiometricDisplay (ref Array tptQuery. ByVal m Delphi function BiometricDisplay(var tptQuery: PSafeArray. hdc. ~TTemplate(void). Biometric display methods BiometricDisplay SetBiometricDisplayColors BiometricDisplay Returns a picture display handle (IPictureDisp) to the supplied raw grayscale fingerprint image with its minutiae. // Image height.griaulebiometrics.IPictureDisp handle. ref stdole. segments and minutiae direction drawn. // release screen HDC ReleaseDC(HWND(nil). begin GrFingerXCtrl1. ByVal height As Long. segments and minutiae direction drawn. int height.com/page/pt-br/book/export/html/361 _pbPic. On failure. res: Integer. ByVal hdc As Long. System::Object *img.height. hdc) Delphi var // handle to finger image handle: IPictureDisp. raw.ref Object rawImage.NET // the template class __gc class TTemplate { public: // Template data. [in] rawImage A raw grayscale fingerprint image. unsigned int height. this parameter must be the context identifier corresponding to the matching (identification or verification). width: Integer. handle). To have also the macthing minutiae. this parameter must be GR_NO_CONTEXT. segments and minutiae direction of the supplied fingerprint drawn.CapRawImageToHandle(raw. ByVal width As Integer. ByRef handle As IPictureDisp. end. // Image resolution. height: Integer.Picture.NET int BiometricDisplay (ref byte[] tptQuery. Parameters [in] tpt Template corresponding to the raw grayscale fingerprint image supplied. hdc: integer. ByRef handle As stdole. Return On success. matchContext: Integer): In Sample Code C++ . hdc).ref object rawImage. ByVal hdc As Integer. handle). // Raw image data type. int width. [out] handle The fingerprint picture display handle (IPictureDisp).Repaint(). // screen HDC hdc: LongInt. int matchContext) VB6 Function BiometricDisplay (ByRef tptQuery() As Byte. [in] hdc The device context handle (HDC) in which the picture will be created. int height.IPictureDisp handle. See also Fingerprint Image Format Declaration C++ .IPictureDisp. raw. image. var handler: IPictureDisp. [in] height Fingerprint image height in pixels.width. GR_OK is returned. [in] matchContext To have only the minutiae. [in] res Fingerprint image resolution in DPI. // Template size int _size. unsigned int width. Res: Integer. _pbPic. img: OleVariant.(int)contextId).GR_MAX_SIZE_TEMPLATE) As Byte ' Template size Public Size As Long End Class ' Raw image data type. raw. end. // Image height. Public img As Object ' Image width. if (handle != NULL) { Image *curImage = System::Drawing::Image::FromHbitmap(handle->Handle). tpt: PSafeArray.hdc). public TTemplate(){ // Create a byte buffer for the template _tpt = new byte[(int)GRConstants.IpictureToImage(handle). Public width As Long ' Image height. }.IntPtr. hdc. _raw->Res. IntPtr hdc = g->GetHdc(). IPictureDisp handle = null.hPal)) _pbPic.Update(). public int width.ToInt32().height.height. // Define a type to temporary storage of template TTemplate = class public // Template data. } g->ReleaseHdc(hdc). _raw. // screen HDC Graphics *g = _btEnroll->CreateGraphics(). _grfingerx->BiometricDisplay(&_tpt->_tpt. _pbPic->Update(). // draw image on picture box if (handle != null) { _pbPic.GR_MAX_SIZE_TEMPLATE].Picture = handle End If VB . raw. // Image width. width: Integer. // screen HDC IntPtr hdc = GetDC(System. Public Type rawImage ' Image data. public object img.res. height As Long ' Image resolution. public int height. // Image height. handle.width. // Template size public int _size.hDC.IPictureDisp = Nothing ' screen HDC Dim hdc = GetDC(0) _GrFingerX. Public res As Long End Structure ' handle to finger image Dim handle As stdole.biometricDisplay template. raw.hdc. _raw->height.tpt.Zero. handle. 53 of 63 3/4/2009 14:33 . C# public class TTemplate { // Template data.Fingerprint SDK 2009 Developer's Manual http://www. Public height As Long ' Image resolution. _raw. }. Height: Integer. res As Long End Type ' Template data Type Public Type TTemplate ' Template data tpt() As Byte ' Template size Size As Long End Type Dim handle As IPictureDisp GrFingerXCtrl1.com/page/pt-br/book/export/html/361 int Res.Res.BiometricDisplay(template. _pbPic->Image = curImage. ref handle.width. VB6 ' Raw image data type. TRawImage = record // Image data.Image = Image. raw. hdc.ToInt32(). public int Res. stdole::IPictureDisp *handle.tpt. &_raw->img.res. } } // Raw image data type. _size = 0. context) If Not (handle Is Nothing) Then _pbPic.FromHbitmap(New IntPtr(handle.img. // Image resolution.Zero). _grfingerx._tpt. raw. Public Structure RawImage ' Image data. raw. img As Variant ' Image width. // Image width. public Array _tpt. raw. context).BiometricDisplay(ref _tpt. _raw->width. &handle.img. } ReleaseDC(System.Handle). context If Not (handle Is Nothing) Then img.width. _raw. public struct TRawImage { // Image data.Update() End If ' release screen HDC ReleaseDC(0. // Image resolution. formMain.GRConstants.griaulebiometrics.height.Image = GrFingerXSampleCS. width As Long ' Image height. raw. New IntPtr(handle. hdc) Delphi type // Raw image data type. ImageConverter. ref raw.NET ' Template data Public Class TTemplate ' Template itself Public tpt(GrFingerXLib.IntPtr.img. int directionMatchedColors) C# int SetBiometricDisplayColors(int minutiaeColors. // don't display any other biometric info int segmentsColor = GR_IMAGE_NO_COLOR.raw.com/page/pt-br/book/export/html/361 size Integer. int segmentColors. // don't display any other biometric info int segmentsColor = (int)GRConstants. segments and minutiae direction. the appropriate error code is returned.NET // set minutiae colors to red int minutiaeColor=Color::Red. int segmentsMatchColor = (int)GRConstants. int directionsColor = GR_IMAGE_NO_COLOR.griaulebiometrics. handle. matching segments. minutiaeMatchedColors. segmentMatchedColors.GR_IMAGE_NO_COLOR. int minutiaeMatchColor=Color.width. Prerequisites The Fingerprint SDK library must have been previously initialized. [in] segmentsMatchedColor Matching segments color in BGR 24-bits format. segment. [in] directionsColor Minutiae direction color in BGR 24-bits format. int minutiaeMatchColor=Color::Red. int directionColors.GR_IMAGE_NO_COLOR. Sample Code C++ . directionsMatchColor). // release screen HDC ReleaseDC(HWND(nil).NET Function GrSetBiometricDisplayColors(ByVal minutiaeColors As Integer. ByVal direct Delphi function GrSetBiometricDisplayColors (minutiaeColors. int directionColors.img. minutia direction or matching minutia direction) not being drawn. raw. segmentColors. int minutiaeMatchedColors. ID (if retrieved from DB) Integer. minutiae directions and matching minutiae directions in the picture returned by the BiometricDisplay method. image. int segmentsMatchColor = GR_IMAGE_NO_COLOR.raw. [in] minutiaeMatchedColor Matching minutiae color in BGR 24-bits format. directionMatchedColors: integer): integer. Parameters [in] minutiaeColor Minutiae color in BGR 24-bits format.Red.tpt.height. C# // set minutiae colors to red int minutiaeColor=Color. Remarks Passing GR_IMAGE_NO_COLOR as any color causes the corresponding feature (minutia.SetBiometricDisplayColors(minutiaeColor. axGrFingerXCtrl1. matching segment. directionsMatchColor).Res.Repaint(). raw. // screen HDC hdc: LongInt.BiometricDisplay(template. int segmentMatchedColors.Red. directionsColor. begin GrFingerXCtrl1. segments. segmentsColor. minutiaeMatchColor.GR_IMAGE_NO_COLOR. On failure.NET int SetBiometricDisplayColors(int minutiaeColors. directionsColor. context) if handle <> nil then begin SetOlePicture(image. See also Color Coding Format Declaration C++ . int directionsMatchColor = GR_IMAGE_NO_COLOR. handle). blue for minutiae direction and magenta for matching minutiae. matching minutiae. green for segments. ByVal minutiaeMatchedColors As Long. segmentsMatchColor. Passing all colors as GR_IMAGE_NO_COLOR causes the default colors to be used: red for minutiae.Fingerprint SDK 2009 Developer's Manual // Template size: // Template id: http://www. ByVal segmentMatchedColors As Integer. axGrFingerXCtrl2->SetBiometricDisplayColors(minutiaeColor. int directionsColor = (int)GRConstants. ByVal segmentColors As Integer. ByVal segmentColors As Long. int minutiaeMatchedColors. int directionsMatchColor = (int)GRConstants. [in] directionsMatchedColor Matching minutiae direction color in BGR 24-bits format. var // handle to finger image handle: IPictureDisp. SetBiometricDisplayColors Sets the colors used to draw the minutiae. minutiaeMatchColor.GR_IMAGE_NO_COLOR. ByVal minutiaeMatchedColors As Integer. segmentsMatchColor. directionColors. segmentsColor. ByVal directionColors As VB . int segmentColors. matching minutia. hdc).Picture. VB6 ' set minutiae colors to red minutiaeColors = vbRed ' don't display any other biometric colors minutiaeMatchedColors = GR_IMAGE_NO_COLOR segmentColors = GR_IMAGE_NO_COLOR 54 of 63 3/4/2009 14:33 . hdc. [in] segmentsColor Segments color in BGR 24-bits format. int segmentMatchedColors. end. Return On success. ByVal segmentMatchedColors As Long. GR_OK is returned. int directionMatchedColors) VB6 Function GrSetBiometricDisplayColors(ByVal minutiaeColors As Long. The recommended size is GR_MAX_SIZE_TEMPLATE bytes. minutiaeMatchedColors. ByVal encodedSize As Integer. segmentColors. [out] The size in bytes of the decoded template. directionsMatchColor). int encodedSize. var decodedSize: integer): integer.griaulebiometrics. ref int decodedSize).Fingerprint SDK 2009 Developer's Manual http://www. segmentsColor: Integer. directionMatchedColors) Delphi var minutiaeColor: Integer. Prerequisites The template array must be already allocated. directionColors. begin // set minutiae colors to red minutiaeColor := clRed. segmentColors. ByRef decodedBuffer As Array.Red ' don't display any other biometric info minutiaeMatchedColors = GR_IMAGE_NO_COLOR segmentColors = GR_IMAGE_NO_COLOR segmentMatchedColors = GR_IMAGE_NO_COLOR directionColors = GR_IMAGE_NO_COLOR directionMatchedColors = GR_IMAGE_NO_COLOR retVal= GrFingerXCtrl1.NET ' set minutiae colors to red minutiaeColors = Color. minutiaeMatchColor := clRed. var decodedBuffer: PSafeArray. [out] decodedBuffer The byte array in which the decoded template will be stored. minutiaeMatchColor: Integer. ByVal encodedSize As Long. segmentsMatchColor: Integer. segmentsMatchColor. directionMatchedColors) VB . end.SetBiometricDisplayColors (minutiaeColors. directionsMatchColor: Integer. ByRef decodedSize As Long) As Long VB . directionsColor: Integer. the appropriate error code is returned. ByRef decodedSize As Integer) As Integer Delphi function DecodeBase64(var encodedBuffer: PSafeArray. Return On success. VB6 Function DecodeBase64 (ByRef encodedBuffer() As Byte. GetGrFingerVersion Returns the Fingerprint SDK version and edition. See also Return codes Declaration C++ . On failure.NET Function DecodeBase64 (ByRef encodedBuffer As Array. Other methods GetGrFingerVersion DecodeBase64 EncodeBase64 InstallLicense IsBase64Encoding SetLicenseFolder DecodeBase64 Decodes a Base64 template. ByRef decodedBuffer() As Byte. [in. segmentMatchedColors. directionsMatchColor := GR_IMAGE_NO_COLOR. ref Array decodedBuffer. minutiaeMatchedColors. directionColors.SetBiometricDisplayColors(minutiaeColor. GrFingerXCtrl1. the Fingerprint SDK type code is returned.out] decodedSize [in] The maximum size in bytes of the byte array supplied.NET int DecodeBase64 (ref byte[] encodedBuffer. Return On success.SetBiometricDisplayColors (minutiaeColors. minutiaeMatchColor. int encodedSize. segmentMatchedColors. the appropriate error code is returned. segmentsMatchColor := GR_IMAGE_NO_COLOR. Parameters 55 of 63 3/4/2009 14:33 . directionsColor.com/page/pt-br/book/export/html/361 segmentMatchedColors = GR_IMAGE_NO_COLOR directionColors = GR_IMAGE_NO_COLOR directionMatchedColors = GR_IMAGE_NO_COLOR retVal= GrFingerXCtrl1. // don't display any other biometric info segmentsColor := GR_IMAGE_NO_COLOR. ref int decodedSize). ref byte[] decodedBuffer. Prerequisites A valid license must exist on system. encodedSize: integer. GR_OK is returned. segmentsColor. C# int DecodeBase64 (ref Array encodedBuffer. Parameters [in] encodedBuffer The template to be decoded. directionsColor := GR_IMAGE_NO_COLOR. [in] encodedSize The size in bytes of the supplied base64 template.On failure. IsBase64Encoding Verifies if a buffer is in Base64 format." + minorVersion + ".' + #13#10 + 'The license type is ''' + vStr + '''. ByRef minorVersion As Byte) As Long VB . See also Licensing constants Declaration C++ .GetGrFingerVersion(ref majorVersion.GRFINGER_FREE) vStr = "FREE". \n" + "The license type is '" + vStr + "'. Convert::ToString(minorVersion)). Sample Code C++ . String *vStr = new String("").Fingerprint SDK 2009 Developer's Manual http://www.GRFINGER_LIGHT) vStr = "VERIFICATION". minorVersion=0. minorVersion).GetGrFingerVersion(majorVersion.')." & minorVersion & ". string vStr = "". If result = GRFINGER_FREE Then vStr := 'FREE'." & minorVersion & ". ref byte minorVersion) C# int GetGrFingerVersion(ref Byte majorVersion. minorVersion: Byte): integer.".NET Dim Dim Dim Dim majorVersion As Integer = 0 minorVersion As Integer = 0 result As GRConstants vStr As String = "" result = _GrFingerX.GRFINGER_FREE Then vStr = "FREE" MessageBox.' + intToStr(minorVersion) + '.GRFINGER_LIGHT Then vStr = "VERIFICATION" If result = GRConstants. minorVersion) If result = GRConstants. minorVersion: byte. ByRef minorVersion As Byte) As Long Delphi Function GetGrFingerVersion(majorVersion.Show("The Fingerprint SDK DLL version is " & majorVersion & _ ". else if(result == GRFINGER_FREE) vStr = new String("FREE").Show("The Fingerprint SDK DLL version is " + majorVersion + ". vStr: String.MessageBox(PChar('The Fingerprint SDK DLL version is ' + intToStr(majorVersion) + '. "Fingerprint SDK Version") End Sub Delphi var majorVersion: byte. begin result := GrFingerXCtrl1. Parameters 56 of 63 3/4/2009 14:33 . &minorVersion). . ref minorVersion)."Fingerprint SDK Version"). else if(result == GRConstants. [out] minorVersion The Fingerprint SDK minor version.GetGrFingerVersion(majorVersion. MessageBox::Show(System::String::Concat(System::String::Concat("The Fingerprint SDK DLL version is ".com/page/pt-br/book/export/html/361 [out] majorVersion The Fingerprint SDK major version. Convert::ToString(majorVersion) . else if(result == GRFINGER_LIGHT) vStr = new String("VERIFICATION").NET int GetGrFingerVersion(ref byte majorVersion.". else if(result == GRConstants.NET Function GetGrFingerVersion(ByRef majorVersion As Byte. PChar(' End.GetGrFingerVersion(majorVersion.NET unsigned char majorVersion=0. "Fingerprint SDK Version") VB . Otherwise. If result = GRFINGER_FULL Then vStr := 'IDENTIFICATION'." . ". ref Byte minorVersion) VB6 Function GetGrFingerVersion(ByRef majorVersion As Byte. System::String::C C# byte majorVersion=0. Return True if the supplied buffer is in Base64 format. If result = GRFINGER_LIGHT Then vStr := 'VERIFICATION'.". result: integer. if (result == GRFINGER_FULL) vStr = new String("IDENTIFICATION"). if(result == GRConstants.GRFINGER_FULL Then vStr = "IDENTIFICATION" If result = GRConstants.griaulebiometrics.minorVersion=0. int result = _grfingerx->GetGrFingerVersion(&majorVersion. minorVersion) If ret = GRFINGER_FULL Then vStr = "IDENTIFICATION" If ret = GRFINGER_LIGHT Then vStr = "VERIFICATION" If ret = GRFINGER_FREE Then vStr = "FREE" Call MsgBox("The Fingerprint SDK DLL version is " & majorVersion & _ ".GRFINGER_FULL) vStr = "IDENTIFICATION"." & vbCrLf & _ "The license type is '" & vStr & "'. result = (GRConstants)_grfingerx." & vbCrLf & _ "The license type is '" & vStr & "'. GRConstants result. Application. MessageBox. VB6 Dim Dim Dim Dim majorVersion As Byte minorVersion As Byte ret As Long vStr As String majorVersion = 0 minorVersion = 0 vStr = "" ret = GrFingerX. False is returned. the appropriate error code is returned. Parameters [in] buffer The template to be encoded. C# int EncodeBase64 (ref Array buffer. ByRef encodedSize As Long) As Long VB . ByVal bufferSize As Long) As Boolean VB . Declaration C++ .NET int EncodeBase64 (ref byte[] buffer. Parameters [in] productKey the Product Key. Prerequisites The template array must be already allocated. ref int encodedSize). See also Return codes Declaration C++ . [in] bufferSize The size in bytes of the supplied template. C# bool IsBase64Encoding (ref Array buffer. bufferSize: integer): boolean. the appropriate error code is returned.On failure. Return On success. Prerequisites This method must be called before the initialization of the library. the template quality code is returned. ByRef encodedBuffer As Array. var encodedBuffer: PSafeArray.griaulebiometrics. int bufferSize). The recommended size is GR_MAX_SIZE_TEMPLATE bytes.NET Function IsBase64Encoding (ByRef buffer As Array. ref byte[] encodedBuffer.NET int InstallLicense (string productKey) C# int InstallLicense (string productKey) 57 of 63 3/4/2009 14:33 . int bufferSize. [out] encodedBuffer The byte array in which the encoded template will be stored.out] encodedSize [in] The maximum size in bytes of the byte array supplied. [in. [in] bufferSize The size in bytes of the supplied buffer. bufferSize: integer. ref int encodedSize). VB6 Function IsBase64Encoding (ByRef buffer() As Byte. Return On success.NET Function EncodeBase64 (ByRef buffer As Array.Fingerprint SDK 2009 Developer's Manual [in] buffer http://www. ByRef encodedBuffer() As Byte. EncodeBase64 Encodes a template in Base64 format. int bufferSize. On failure. VB6 Function EncodeBase64 (ByRef buffer() As Byte. int bufferSize). See also Return codes Declaration C++ . [out] The size in bytes of the encoded template. var encodedSize: integer): integer. ref Array encodedBuffer. ByVal bufferSize As Integer.NET bool IsBase64Encoding (ref byte[] buffer. ByVal bufferSize As Integer) As Boolean Delphi function IsBase64Encoding(var buffer: PSafeArray. ByRef encodedSize As Integer) As Integer Delphi function EncodeBase64(var buffer: PSafeArray. GR_OK is returned. InstallLicense Installs a license based on the product key.com/page/pt-br/book/export/html/361 The buffer to be verified. ByVal bufferSize As Long. Sample Code C++ . Events All events fired by ActiveX components are synchronized.com/page/pt-br/book/export/html/361 VB6 Function InstallLicense (ByVal productKey As String) VB . read "Licensing Fingerprint SDK Based Deployed Applications" section to know how Fingerprint SDK searchs for the license file. See also Return codes Declaration C++ .Fingerprint SDK 2009 Developer's Manual http://www. Return On success._IGrFingerXCtrlEvents_SensorPlugEvent) Handles [Control Name].griaulebiometrics. GR_OK is returned. const idSensor: WideString).Object.NET int SetLicenseFolder (string licenseFolder) C# int SetLicenseFolder (string licenseFolder) VB6 Function SetLicenseFolder (ByVal licenseFolder As String) VB .NET Function InstallLicense (ByVal productKey As String) Delphi function InstallLicense(const productKey: WideString): integer._IGrFingerXCtrlEvents_SensorPlugEvent e) VB6 Sub [Control Name]_SensorPlug(ByVal idSensor As String) VB . the appropriate error code is returned. SetLicenseFolder Sets the directory in which Fingerprint SDK must search for its runtime license file. This is an optional function.NET void [Control Name]_SensorPlug(System::Object * sender.NET Sub [Control Name]_SensorPlug(ByVal sender As System. At least one fingerprint reader must be connected and working. Code events carefully to avoid race and deadlock conditions in your application.NET 58 of 63 3/4/2009 14:33 .NET Function SetLicenseFolder (ByVal licenseFolder As String) Delphi function SetLicenseFolder(const licenseFolder: WideString): integer. Declaration C++ . Please. Prerequisites This method must be called before the initialization of the library. Parameters [in] idSensor The ID of the fingerprint reader that raised the event. [Library Name]. This means that an event is fired only after any other event already fired finishes. Prerequisites The capture module must have been previously initialized. Parameters [in] licenseFolder the directory where the Fingerprint SDK runtime license file is located.SensorPlug Delphi procedure [Control Name]SensorPlug(Sender: TObject. ByVal e As [Library Name]. _IGrFingerXCtrlEvents_SensorPlugEvent * e) C# void [Control Name]_SensorPlug(object sender.On failure. SensorPlug SensorUnplug FingerDown FingerUp ImageAcquired SensorPlug This event is fired whenever a fingerprint reader is plugged into the computer. } e) { C# // A fingerprint reader was unplugged on system private void axGrFingerXCtrl1_SensorUnplug(object sender.CapStopCapture (idSensor). } VB6 ' A fingerprint reader was plugged on system Private Sub GrFingerXCtrl1_SensorPlug(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". axGrFingerXCtrl1. Event: Unplugged."). Event: Plugged. Event: Unplugged.NET ' A fingerprint reader was unplugged on system Private Sub AxGrFingerXCtrl1_SensorUnplug(ByVal sender As System.CapStartCapture(e. ByVal e As AxGrFingerXLib. Parameters [in] idSensor The ID of the fingerprint reader that raised the event. Event: Plugged.") GrFingerXCtrl1.NET // A fingerprint reader was unplugged on system private: System::Void axGrFingerXCtrl2_SensorUnplug(System::Object * sender.idSensor & ". Declaration C++ .CapStartCapture (idSensor). e->idSensor ._IGrFingerXCtrlEvents_SensorUnplugEvent e) { WriteLog("Sensor: " + e.idSensor). ByVal e As [Library Name]. ".")). const idSensor: WideString). ". } e) { C# // A fingerprint reader was plugged on system private void axGrFingerXCtrl1_SensorPlug(object sender. ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_SensorPlugEvent e) { WriteLog("Sensor: " + e. e->idSensor . Prerequisites The capture module must have been previously initialized.SensorUnplug WriteLog("Sensor: " & e. end. SensorUnplug This event is fired whenever a fingerprint reader is unplugged from the computer. GrFingerXCtrl1. Event: Plugged. _IGrFingerXCtrlEvents_SensorUnplugEvent * WriteLog(String::Concat(S"Sensor: " ."). [Library Name].idSensor + ".CapStartCapture(e.Fingerprint SDK 2009 Developer's Manual http://www.Object.CapStartCapture (idSensor) End Sub VB . Event: Unplugged.CapStopCapture(e. begin writeLog ('Sensor: ' + idSensor + '.griaulebiometrics. begin writeLog ('Sensor: ' + idSensor + '. _IGrFingerXCtrlEvents_SensorUnplugEvent * e) C# void [Control Name]_SensorUnplug(object sender.idSensor) End Sub Delphi // A fingerprint reader was plugged on system procedure TGrFingerXCtrl1SensorPlug(Sender: TObject. Sample Code C++ .Object. Event: Plugged.idSensor). 59 of 63 3/4/2009 14:33 . end.") AxGrFingerXCtrl1. axGrFingerXCtrl2->CapStopCapture(e->idSensor).').idSensor & ".NET Sub [Control Name]_SensorUnplug(ByVal sender As System._IGrFingerXCtrlEvents_SensorPlugEvent) Handles AxGrFingerXCtrl1.').CapStopCapture (idSensor) End Sub VB . At least one fingerprint reader must be connected. const idSensor: WideString)._IGrFingerXCtrlEvents_SensorUnplugEvent) Handles AxGrFingerXCtrl1.idSensor + ". } VB6 ' A fingerprint reader was unplugged on system Private Sub GrFingerXCtrl1_SensorUnplug(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". working and recognized as plugged by the capture module. GrFingerXCtrl1._IGrFingerXCtrlEvents_SensorUnplugEvent) Handles [Control Name].idSensor) End Sub Delphi // A fingerprint reader was unplugged on system procedure TGrFingerXCtrl1SensorUnplug(Sender: TObject.") GrFingerXCtrl1.SensorUnplug Delphi procedure [Control Name]SensorUnplug(Sender: TObject.NET ' A fingerprint reader was plugged on system Private Sub AxGrFingerXCtrl1_SensorPlug(ByVal sender As System.") AxGrFingerXCtrl1.")).com/page/pt-br/book/export/html/361 // A fingerprint reader was plugged on system private: System::Void axGrFingerXCtrl2_SensorPlug(System::Object * sender.NET void [Control Name]_SensorUnplug(System::Object * sender. Event: Unplugged. Event: Unplugged. _IGrFingerXCtrlEvents_SensorPlugEvent * WriteLog(String::Concat("Sensor: " . const idSensor: WideString). Event: Plugged. AxGrFingerXLib.CapStopCapture(e. axGrFingerXCtrl1._IGrFingerXCtrlEvents_SensorUnplugEvent e) VB6 Sub [Control Name]_SensorUnplug(ByVal idSensor As String) VB .Object.SensorPlug WriteLog("Sensor: " & e. AxGrFingerXLib. axGrFingerXCtrl2->CapStartCapture(e->idSensor). const idSensor: WideString). At least one fingerprint reader started capturing fingerprint images. [Library Name]._IGrFingerXCtrlEvents_FingerUpEvent e) VB6 Sub [Control Name]_FingerUp(ByVal idSensor As String) VB . Event: Finger Placed._IGrFingerXCtrlEvents_FingerDownEvent e) VB6 Sub [Control Name]_FingerDown(ByVal idSensor As String) VB . Sample Code C++ . } VB6 ' A finger was placed over the reader Private Sub GrFingerXCtrl1_FingerDown(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ".Fingerprint SDK 2009 Developer's Manual http://www._IGrFingerXCtrlEvents_FingerDownEvent) Handles [Control Name].Object.FingerDown WriteLog("Sensor: " & e.Object. ". begin writeLog ('Sensor: ' + idSensor + '. Event: Finger Placed. Event: Finger Placed. Event: Finger Placed. Sample Code C++ . Declaration C++ ._IGrFingerXCtrlEvents_FingerDownEvent) Handles AxGrFingerXCtrl1.NET // A finger was placed over the reader private: System::Void axGrFingerXCtrl2_FingerDown(System::Object * sender.FingerDown Delphi procedure [Control Name]FingerDown(Sender: TObject.idSensor & "."). const idSensor: WideString). Parameters [in] idSensor The ID of the fingerprint reader that raised the event.Object._IGrFingerXCtrlEvents_FingerDownEvent e) { WriteLog("Sensor: " + e. } e) { C# // A finger was placed over the reader private void axGrFingerXCtrl1_FingerDown(object sender.NET void [Control Name]_FingerUp(System::Object * sender. AxGrFingerXLib.idSensor + ". Event: Finger Placed.") End Sub VB . const idSensor: WideString). [Library Name].FingerUp Delphi procedure [Control Name]FingerUp(Sender: TObject.NET void [Control Name]_FingerDown(System::Object * sender.NET // A finger was removed over the reader 60 of 63 3/4/2009 14:33 . FingerUp This event is fired whenever a finger is removed from a plugged fingerprint reader. ByVal e As AxGrFingerXLib. _IGrFingerXCtrlEvents_FingerUpEvent * e) C# void [Control Name]_FingerUp(object sender.")). Parameters [in] idSensor The ID of the fingerprint reader that raised the event. Declaration C++ .") End Sub Delphi // A finger was placed over the reader procedure TGrFingerXCtrl1FingerDown(Sender: TObject.NET Sub [Control Name]_FingerDown(ByVal sender As System.NET ' A finger was placed over the reader Private Sub AxGrFingerXCtrl1_FingerDown(ByVal sender As System. end. ByVal e As [Library Name].'). At least one fingerprint reader started capturing fingerprint images. _IGrFingerXCtrlEvents_FingerDownEvent * WriteLog(String::Concat(S"Sensor: " . ByVal e As [Library Name]. Prerequisites The capture module must have been previously initialized. e->idSensor ._IGrFingerXCtrlEvents_FingerUpEvent) Handles [Control Name]. _IGrFingerXCtrlEvents_FingerDownEvent * e) C# void [Control Name]_FingerDown(object sender.NET Sub [Control Name]_FingerUp(ByVal sender As System.com/page/pt-br/book/export/html/361 FingerDown This event is fired whenever a finger is placed over a plugged fingerprint reader.griaulebiometrics. Prerequisites The capture module must have been previously initialized. // display the fingerprint image PrintBiometricDisplay(false. Prerequisites The capture module must have been previously initialized. GRConstants. Event: Image captured.rawImage. ByVal e As AxGrFingerXLib. At least one fingerprint reader started capturing fingerprint images.').")). _raw. } VB6 ' A finger was removed over the reader Private Sub GrFingerXCtrl1_FingerUp(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". rawImage As Variant. _IGrFingerXCtrlEvents_ImageAcquiredEvent * e) C# void [Control Name]_ImageAcquired(object sender. Event: Image captured. Sample Code C++ .griaulebiometrics. _raw->height = e->height. S". e->idSensor ._IGrFingerXCtrlEvents_ImageAcquiredEvent) Handles [Control Name].")).idSensor & ".") End Sub VB ._IGrFingerXCtrlEvents_ImageAcquiredEvent e) { // Copying acquired image _raw. end.img = e.NET Sub [Control Name]_ImageAcquired(ByVal sender As System. Convert::ToString(e->idSensor). const dSensor: WideString.height.res."). [in] res Fingerprint image resolution in DPI._IGrFingerXCtrlEvents_ImageAcquireEvent e) VB6 Sub [Control Name]_ImageAcquired(ByVal idSensor As String. 61 of 63 3/4/2009 14:33 . Parameters [in] idSensor The ID of the fingerprint reader that raised the event. Event: Finger removed. See also Fingerprint Image Format Declaration C++ .idSensor + ".NET ' A finger was removed over the reader Private Sub AxGrFingerXCtrl1_FingerUp(ByVal sender As System.FingerUp WriteLog("Sensor: " & e.NET void [Control Name]_ImageAcquired(System::Object * sender.Object. } e) { C# // A finger was removed over the reader private void axGrFingerXCtrl1_FingerUp(object sender. ByVal res As Long) VB . begin writeLog ('Sensor: ' + idSensor + '._IGrFingerXCtrlEvents_FingerUpEvent e) { WriteLog("Sensor: " + e. ".idSensor + ". // display the fingerprint image PrintBiometricDisplay(false.width. ByVal e As [Library Name]."). sender._IGrFingerXCtrlEvents_FingerUpEvent) Handles AxGrFingerXCtrl1. ImageAcquired This event is fired whenever a fingerprint image is acquired from a plugged fingerprint reader. res: Integer). WriteLog(String::Concat(S"Sensor: ". Event: Finger removed. Event: Finger removed. GR_DEFAULT_CONTEXT).NET private: System::Void axGrFingerXCtrl2_ImageAcquired(System::Object * // Copying acquired image _raw->img = e->rawImage. [Library Name]. _raw.Res = e.ImageAcquired Delphi procedure [Control Name]ImageAcquired(Sender: TObject. } C# private void axGrFingerXCtrl1_ImageAcquired(object sender. ByVal width As Long. _IGrFingerXCtrlEvents_FingerUpEvent * WriteLog(String::Concat(S"Sensor: " . WriteLog("Sensor: " + e.height = (int) e. Event: Finger removed. _raw. width.width = (int) e. [in] width Fingerprint image width in pixels.") End Sub Delphi // A finger was removed over the reader procedure TGrFingerXCtrl1FingerUp(Sender: TObject. var rawImage: OleVariant.Fingerprint SDK 2009 Developer's Manual http://www. // Signaling that an Image Event occurred. height: Integer. ByVal height As Long. const idSensor: WideString). [in] rawImage The raw grayscale fingerprint image. [in] height Fingerprint image height in pixels. Event: Finger removed.com/page/pt-br/book/export/html/361 private: System::Void axGrFingerXCtrl2_FingerUp(System::Object * sender.GR_DEFAULT_CONTEXT). _raw->Res = e->res. _IGrFingerXCtrlEvents_ImageAcquiredEvent * e) { // Signaling that an Image Event occurred. AxGrFingerXLib. AxGrFingerXLib.Object. _raw->width = e->width. processing) is the process of discovering who someone is by his/her fingerprints. raw.height = height . height: Integer. Event: Image captured. GRConstants. ByVal height As Long. Storing any data passed to or from Fingerprint SDK library must be done by the application.img = rawImage .').height = e.Net Please refer to the Fingerprint SDK. var rawImage: OleVariant.Object.griaulebiometrics. WriteLog("Sensor: " & e. If not. const idSensor: WideString. FingerprintSdk. Fingerprint SDK Java for Windows Reference Guide Please refer to the Fingerprint SDK Javadoc.height := height. Check if the programming language can import the Fingerprint SDK ActiveX Component. Frequently Asked Questions Identification and verification Using Fingerprint SDK with language XYZ Database used by Fingerprint SDK Identification and verification Q: What's the difference between "verification" and "identification" processes? A: Identification (or 1:N . Event: Image captured. ByVal e As AxGrFingerXLib.GR_DEFAULT_CONTEXT) End Sub Delphi procedure TGrFingerXCtrl1ImageAcquired(Sender: TObject. Event: Image captured.NET Reference Guide. try creating an import file.Fingerprint SDK 2009 Developer's Manual http://www.rawImage ' Signaling that an Image Event occurred. raw. Isn't Fingerprint SDK compatible with such programming language? Q: Isn't Fingerprint SDK compatible with programming language XYZ? A: The fact of having no sample in the SDK coded in a programming language doesn't mean Fingerprint SDK isn't compatible with such programming language.processing) is the process of making sure someone really is who he/she claims to be.width = e. The identification process compares the given fingerprint (query or candidate) with all the recorded fingerprints (references) in the system. The verification process compares the given fingerprint (query or candidate) with an already recorded fingerprint (reference) of the claimed person. B: Verification (or 1:1 . GR_DEFAULT_CONTEXT) End Sub VB .width := width. ByVal width As Long.img := rawImage. res: Integer). rawImage As Variant.") ' display the fingerprint image PrintBiometricDisplay(False. GR_DEFAULT_CONTEXT). Troubleshooting Extraction returns GR_NOT_ENOUGH_SPACE Reader doesn't work Identification problems 62 of 63 3/4/2009 14:33 . // display the fingerprint image PrintBiometricDisplay(false. width.img = e. begin // Copying acquired image raw._IGrFingerXCtrlEvents_ImageAcquiredEvent) Handles AxGrFingerXCtrl1.res := res. Database used by Fingerprint SDK Q: Which database does Fingerprint SDK use? A: Fingerprint SDK doesn't use or interact with any database.width = width .com/page/pt-br/book/export/html/361 } VB6 Private Sub GrFingerXCtrl1_ImageAcquired(ByVal idSensor As String.") ' display the fingerprint image Call PrintBiometricDisplay(False.idSensor & ". writeLog ('Sensor: ' + idSensor + '.ImageAcquired ' Copying acquired image raw.width raw. raw.NET Private Sub AxGrFingerXCtrl1_ImageAcquired(ByVal sender As System.one-to-many . // Signaling that an Image Event occurred.one-to-one .res = e.res = res End With ' Signaling that an Image Event occurred. end. ByVal res As Long) ' Copying acquired image With raw . Using Fingerprint SDK with language XYZ Q: There is no sample in the SDK coded in the programming language I'm using. writeLog ("Sensor: " & idSensor & ".height raw.res raw. For further information. Solution: Most identification errors are caused by bad fingerprint enrollments. 63 of 63 Use the index finger whenever possible. Solution: Make sure that your fingerprint reader is plugged into the computer. 2. 3/4/2009 14:33 . Depending on the fingerprint reader.griaulebiometrics. Ask the person to place the center of his/her finger in the center of the fingerprint reader and apply some pressure. create such array with the size of GR_MAX_SIZE_TEMPLATE bytes. 4. Reader doesn't work Problem: My fingerprint reader doesn't work. Identification problems Problem: Identification process fails most of (or all) the time. 5. Check if the finger has any scars or is wounded in some way. the GR_NOT_ENOUGH_SPACE error code is returned. otherwise the ring finger).Fingerprint SDK 2009 Developer's Manual http://www. Choose another finger if necessary (preferably the middle one. If the array size is smaller than the resulting template size. Make sure that the enrollment was good by asking the person to put his/her finger again in the fingerprint reader. Some tips for a good fingerprint enrollment: 1. 3. and then try to identify him/her.com/page/pt-br/book/export/html/361 Extraction returns GR_NOT_ENOUGH_SPACE Problem: The extraction funcion always returns GR_NOT_ENOUGH_SPACE. check the Fingerprint Readers Installation section. What does that mean? Solution: You must pass an already allocated byte array to the extraction function. that it is compatible with your operating system and that its driver is installed. To avoid such situation. the person may have to keep the finger upon the reader from 1 to 3 seconds.
Copyright © 2024 DOKUMEN.SITE Inc.