Top Banner
Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361 1 of 63 3/4/2009 14:33 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
10

53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Oct 15, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

1 of 63 3/4/2009 14:33

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

Page 2: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

2 of 63 3/4/2009 14:33

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

Page 3: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

3 of 63 3/4/2009 14:33

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.

Page 4: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

4 of 63 3/4/2009 14:33

If Microsoft, DigitalPersona, Futronic FS80, M2SYS M2-S or Bio-I Cyte fingerprint readers are used, you must remove the manufacturer's device driver and install the FingerCap USB Driver. For further information

check Fingerprint Readers compatible with Griaule FingerCap USB Driver installation section.

FingerCap USB Driver

The FingerCap USB Driver is the new device driver used by Fingerprint SDK for some USB fingerprint readers. It replaces completely the manufacturer's device driver or application, simplifying the application

installation and deployment.

The FingerCap USB Driver 1.2 supports the following fingerprint readers:

Microsoft Fingerprint Reader

DigitalPersona U.Are.U 4000

DigitalPersona U.Are.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.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. Please check it at Griaule Web Site.

Licensing

Fingerprint SDK is distributed with a trial license valid for 90 days*. After this period you have to buy a license to keep using it.

Check the Griaule Web Site for licensing options, pricing and instructions on how to request commercial licenses.

To know how to apply and deploy licenses, check the Licensing Fingerprint SDK Based Deployed Applications section.

Trial license limitations

The trial licenses of Fingerprint SDK are for non-commercial use. There is no technical limitation: the only difference is the splash screen displayed when the library is initializing.

* Note that after 90 days the library still works normally, but using it without a commercial license will be an explicit violation of the license agreement. To use the commercial license there is no need to reinstall the

SDK; you just have to proper replace the trial license with the commercial one.

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.

You also need to check the supported operating systems and the computer requirements for the fingerprint reader you're intending to use. In order to do so, check the manufacturer's website or the fingerprint

reader's documentation.

Supported IDEs

Fingerprint SDK ActiveX component should be supported by any IDE that supports ActiveX components. It does works with the most used Windows IDEs: Visual Basic 6, Delphi 6, Delphi 7, Visual

FoxPro 8, Visual Studio .NET 2003 and Visual Studio .NET 2005.

If you are intending to use Fingerprint SDK in an IDE other than those listed above, make sure it can import and use ActiveX components.

SDK Folders Structure

After installing Fingerprint SDK the following folders will be available in the SDK root folder:

Directory Description

Page 5: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

5 of 63 3/4/2009 14:33

Directory Description

bin Contains all the files needed by Fingerprint SDK library. This folder contains (among others): GrFinger.dll (DLL), GrFingerX.dll (ActiveX) and GrFingerJava.dll (JNI for Windows).

doc

The Fingerprint SDK documentation files.

Fingerprint SDK Developer's Manual ENUS.chm: This manual.

Fingerprint SDK Java: Fingerprint SDK for Windows JavaDoc.

Fingerprint SDK Applet Installer: Fingerprint SDK applet helper for Windows JavaDoc.

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).

lib GrFinger.lib, a library to access Fingerprint SDK in your C++ and C++.NET applications.

samples Contains the samples source codes and binaries.

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. The samples are all similar. In the "bin" folder of each programming language folder you will find the sample

executable file. 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. Each reader scans images in a specific size (width and height), but the samples resize all images to the same size

before displaying them. The box on the bottom of the window shows status messages, e.g. when a reader is plugged or unplugged, a finger is placed over a reader, etc.

By clicking the "Extract template" button, the last acquired fingerprint image is analyzed and its minutiae and segments are identified, extracted and displayed on screen.

The "Enroll" button saves the last extracted template into the database, and the ID of the enrolled template is displayed in the log box.

Placing a finger already enrolled in the database over the reader, waiting the image being acquired and clicking the "Identify" button will perform an identification; clicking the "Verify" button will perform a

verification. In the latter case the sample will ask you the fingerprint ID you want to verify. In both cases the result will be displayed in the log box.

By checking the "Auto identify" option, whenever a finger is placed over the reader, the sample will try to automatically identify the fingerprint; the result will be shown in the log box.

To delete all the fingerprints enrolled in the database, click the "Clear database" button.

To clear the log box, use the "Clear log" button.

To save the currently displayed fingerprint image to a file, select the option "Save..." in the "Image" menu.

To load a fingerprint image saved in BMP format, select the option "Load from file..." in the "Image" menu.

Selecting the "Options..." menu causes a new window to be opened. In this window it's possible to change the identification and verification thresholds, the fingerprint rotation tolerance and also the colors used to

display the fingerprint minutiae, their directions and segments.

Samples Internal Organization

Whenever possible, a sample source code follows the structure below:

File name pattern Description

"Main" The main window, which displays the fingerprint images, handle events, initializes and finalizes the sample.

"Util"Methods responsible for initializing and finalizing the Fingerprint SDK library, performing the basic biometric operations like identification, verification, fingerprint enrollment, etc, and also

support routines, like adding messages to the log box or checking if a fingerprint template is valid.

"Callbacks" (DLL

only)The three callbacks handlers used by Fingerprint SDK (status, finger and image callbacks).

"DB" Methods responsible for adding and retrieving data from database.

"Options" The options window.

Fingerprint Readers Installation

Supported fingerprint readers:

Microsoft Fingerprint Reader

DigitalPersona U.Are.U 4000

DigitalPersona U.Are.U 4000B

Bio-I Cyte

Biotouch / Futronic FS80

Microsoft Wireless IntelliMouse Explorer with Fingerprint Reader

Microsoft Optical Desktop with Fingerprint Reader

M2SYS M2-S

Page 6: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

6 of 63 3/4/2009 14:33

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, Advertisement Banner and Encrypted Images

Deploying a Fingerprint SDK Based Application

Fingerprint SDK DLL Prerequisites

In order to use Fingerprint SDK DLL, add to your project the import file corresponding to the programming language you're using.

Import files for Delphi, C++ and C++.NET are available in the "include" folder in the SDK root folder.

Fingerprint SDK ActiveX Prerequisites

In order to use Fingerprint SDK ActiveX it must be first imported into the IDE you're using.

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

Go to Project -> Components...;1.

Select the GrFingerX Control Library component;2.

The Fingerprint SDK ActiveX component will be added to the Toolbox.3.

Page 7: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

7 of 63 3/4/2009 14:33

Microsoft Visual Studio 2003/2005

Select the Components group of the Toolbox side tab (if necessary, unhide the tab);1.

Right click on a clear area in the tab and select option Add/Remove Items... (VS 2003) or Choose Items... (VS 2005);2.

In the COM Components tab, select the GrFingerXCtrl Class component;3.

The Fingerprint SDK ActiveX component will appear in the Toolbox.4.

Delphi 6/7

Go to Component -> Import ActiveX Control...;1.

Page 8: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

8 of 63 3/4/2009 14:33

Select the GrFingerX Control Library in the component list and click the Install... button;2.

Click the OK button. If a dialog box asks to install the package, click Yes;3.

A project with the Fingerprint SDK ActiveX library will be opened. Don't modify it, just close the project; 4.

The Fingerprint SDK ActiveX component will be added to the Component Palette.5.

Microsoft Visual FoxPro 8

Insert an ActiveX Control (OleControl) in a form;1.

Select the GrFingerXCtrl Class component;2.

The Fingerprint SDK ActiveX component will be added to the form.3.

Page 9: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

9 of 63 3/4/2009 14:33

Fingerprint SDK Java for Windows Prerequisites

The GrFingerJava.jar package contains all the required classes for using Fingerprint SDK Java for Windows.

Fingerprint SDK is a native Windows library, thus Java programs using Fingerprint SDK only run on Windows.

Applet Prerequisites

Applet Prerequisites

In order to use Fingerprint SDK in Java applets for Windows, three more requisites must be met:

Sign the applet to grant permissions for copying files and loading libraries;1.

Copy all required Fingerprint SDK libraries to the client computer running the applet;2.

Copy the Fingerprint SDK license to the client computer running the applet;3.

In order to make it easier to met the second and third requisites, the Fingerprint SDK also contains a helper, the GrFingerAppletInstaller class, that has methods to perform all the necessary operations: unpacking ZIP

files, copying files to the filesystem, initializing GrFinger, removing the copied files.

The ZIP package and license file must be located in the root folder of the JAR archive.

The GrFingerAppletInstaller class handles two resources: a ZIP file (containing the libraries) and a license file.

Using the methods provided by the class, copying the files and creating a GrFinger object is straightforward:

// Create the installer GrFingerAppletInstaller installer = new GrFingerAppletInstaller("","libraries.zip"); // Install libraries installer.copyAndExtractZip(); // Install license

installer.copyLicense("mylicense.txt"); // Create GrFinger object GrFinger grFinger = installer.getGrFinger();

Finalizing GrFinger and removing the copied files using the methods provided by the GrFingerAppletInstaller class is also straightforward:

// Finalize GrFinger library grFinger.finalize(); // Finalize installer, removing copied files installer.finalize();

Applets and Fingerprint SDK Overview

Sun's Java Applet Tutorial at http:// java.sun.com/ docs/ books/ tutorial/ applet/

index.html is a good starting point for Java applets.

An applet is a class inherited from class JApplet (Swing based) or from class Applet (AWT based). An applet has four

abstract milestone methods: init, start, stop and destroy.

init(): Called when the applet initializes;

start(): Called when the applet is started;

stop(): Called when the applet is stopped;

destroy(): Called when the applet is destroyed;

Swing components should be created, queried and manipulated in the event-dispatching thread, but the web-browsers don't invoke any applet milestone method from this thread. Thus, the milestone methods - init,

start, stop, and destroy - 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. Note in the

example below the method invokeAndWait in the init method.

public void init() { //Execute a job on the event-dispatching thread: //creating this applet's GUI. try { javax.swing.SwingUtilities.invokeAndWait(new Runnable() { public void run() { //Initialization code goes here }

}); } catch (Exception e) { System.err.println("Initialization failed!"); }}

If the applet is Swing based, you must initialize and finalize

Fingerprint SDK library in the invokeAndWait method.

An applet using Fingerprint SDK must copy all necessary files to the client computer in the init method. Only after this operation an applet

may load and initialize Fingerprint SDK library. Finally, Fingerprint SDK library must be finalized in the destroy method.

Signing an Applet

The Java Virtual Machine security policy doesn't allow ordinary applets to write data to the filesystem or load libraries. Applets that must perform such operations must be signed. To sign an applet it's necessary to

package it in a JAR file and then sign this file with a trusted certificate.

Another way to grant permissions for writing data to filesystem and loading libraries in a development environment is editing the user's .java.policy file before loading the applet. This procedure isn't

recommended for production environments.

Page 10: 53926349 Fingerprint Sdk 2009 Manual English - BAIXARDOC

Fingerprint SDK 2009 Developer's Manual http://www.griaulebiometrics.com/page/pt-br/book/export/html/361

10 of 63 3/4/2009 14:33

In a development environment, creating self-signed certificates is an easy way to sign applets. To do so you must have the Java SDK installed.

The keytool program is used for managing X.509 certificates. The command "keytool --help" shows the program usage. 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. To do so, use the program jarsigner, using the generated file keyFile as the keystore:

jarsigner -keystore keyFile -storepass storepassword -keypass keypassword -signedjar SignedJarFile.jar JarFile.jar signFiles

The command above will generate the file SignedJarFile.jar, which is the same JarFile.jar, but signed. This must be done for every JAR package needing special permissions that is used by the applet.

When a signed applet is loaded on a web-browser, a message box appears displaying the signature details and asking the user if the applet should be trusted. If the user doesn't trust the signed applet, the special

permissions will not be granted. If the applet uses Fingerprint SDK, such permission denial will cause the library to fail during its initialization.

Fingerprint SDK Based Applications Overview

Like any biometric application, a Fingerprint SDK based application has four basic steps: initializing the Fingerprint SDK library, start capturing images from a fingerprint reader or loading them from files,

extracting a template for each image, 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.

Fingerprint capture overview

Once the capture module is initialized, whenever a supported fingerprint reader is plugged or unplugged into the computer, a corresponding event is fired. In case of a plugging event, the image capture may be started

on the fingerprint reader.

Whenever a finger is placed over a fingerprint reader - assuming such reader is capturing images - the corresponding event is fired. Once the fingerprint image is captured, a new event is fired. Finally, when the finger

is removed from the fingerprint reader, the corresponding event is also fired.

When the capture module is initialized, a special sensor is automatically plugged, firing the corresponding plugging event: the "File" sensor. Enabling image capture on this special sensor is required in order

to load fingerprint images from picture files.

Fingerprint Image Format

The fingerprint image format used in the Fingerprint SDK library is an array of width * height unsigned bytes. Each byte represents a single pixel of the image. The array is arranged in left to right, top to bottom order.

There's no padding, each line immediately follows the previous one. Each pixel has a grayscale value ranging from 0 (pure black) to 255 (pure white). This format does not store information about the resolution or

size (width and height) of the image.

On GrFinger 4.1 FREE and LIGHT versions, the fingerprint images captured from the fingerprint readers couldn't be used for any other purpose because they were encrypted. Although Fingerprint SDK

doesn't encrypt the fingerprint images, it accepts encrypted images as input for backward compatibility purposes.

Color Coding Format

The color coding format used by the Fingerprint SDK library is the BGR 24-bits format. 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), or, blue x 65536 + green x 256 + red.

Some examples:

255 (decimal) or 0000FF (hex) means pure red ( );

65280 (decimal) or 00FF00 (hex) means pure green( );

16711680 (decimal) or FF0000 (hex) means pure blue ( );

0 (decimal) or 000000 (hex) means black ( );

16777215 (decimal) or FFFFFF (hex) means white ( );

Contexts

Contexts are an advanced feature used to:

allow two or more biometric operations to be executed at the same time;

create different ready-to-use identification or verification environments;

Most biometric applications are interactive and don't execute more than one biometric operation at a time, using just the default context. But, for example, to perform two fingerprint identifications simultaneously on

a multithreaded server, each identification must be executed on its own context. Two operations must not be called simultaneously in the same context because they are not guaranteed to be thread-safe. Creating a

new context for each operation that will be executed simultaneously guarantees the thread safety.