CIC iSign Version 1.2

InkTools
Class CicFingerPrint

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--InkTools.CicFingerPrint
All Implemented Interfaces:
java.lang.Runnable

public class CicFingerPrint
extends java.lang.Thread

This class provides a high level interface to the rather complex BioAPI for the use of a fingerprint scanner.

Version:
1.0
Author:
CIC

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CicFingerPrint()
          Constructs a new FingerPrint Object.
 
Method Summary
 void cancelOpp()
          This method cancels the last initiated and completed operation.
 int CaptureFingerPrint()
          Initiates the capture of a fingerprint.
 int EnrollFingerPrint()
          Initiates the enrollment of a fingerprint.
 byte[] GetFingerPrintProcessedData()
          This method returns a byte array with the processed data of the last fingerprint capture or verification process.
 byte[] GetFingerPrintRawData()
          This method returns a byte array with the raw data of the last fingerprint capture or verification process.
 byte[] GetFingerPrintTemplateData()
          This method returns a byte array with the template data of the last fingerprint enrollment process.
 java.lang.String GetLastErrorMsg()
          This method returns the text of the last BioAPI error.
 int GetLastErrorNum()
          This method returns the number of the last BioAPI error.
 int InitFPDevice(IFingerPrint interfaceFp)
          Initializes the attached FingerPrint device This method calls the helper 'Win 32 DLL (CicFp.dll)' which uses the BioAPI, provided by the BSP (Biometric Service Provider), for access to the Fingerprint Device.
 void run()
          Run: default method (from start() call).
 int VerifyFingerPrint(byte[] templData)
          Initiates the verification of a fingerprint.
 int VerifyMatchFingerPrint(byte[] templData, byte[] fpData)
          Initiates the verification of a fingerprint.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CicFingerPrint

public CicFingerPrint()
Constructs a new FingerPrint Object.

Method Detail

InitFPDevice

public int InitFPDevice(IFingerPrint interfaceFp)
Initializes the attached FingerPrint device This method calls the helper 'Win 32 DLL (CicFp.dll)' which uses the BioAPI, provided by the BSP (Biometric Service Provider), for access to the Fingerprint Device. It takes the IFingerPrint pointer (for callback functions) in order to process asynchronous GUI and status messages.

Parameters:
interfaceFp - Caller must implement the IFingerPrint interface
Returns:
  • 0 = no error
  • 1 = General initialization error
  • 2 = Memory error
  • 3 = BioAPI error
  • 4 = No Device Attached
  • 5 = CicFp.dll is missing

cancelOpp

public void cancelOpp()
This method cancels the last initiated and completed operation. For example, the user wanted to enroll but then changed his mind, this function will cancel the enrollment. Note that sometimes this needs some time (up to 30 seconds for enrollment), due to the nature of the BioAPI implementation for the fingerprint device.


CaptureFingerPrint

public int CaptureFingerPrint()
Initiates the capture of a fingerprint. This method returns immediately. The caller gets notified through the StatusSink callback about the result. IFingerPrint.STATUS_CAPTURE_OK or IFingerPrint.STATUS_CAPTURE_FAILED are issued. If failed, GetLastErrorMsg() can be called for further information. IFingerPrint.STATUS_CANCELED is issued if the user cancels this operation. If the capture succeeded, call the GetFingerprintProcessedData () to get the processed fingerprint data, used for verification, an/or call GetFingerprintRawData() to get the raw bitmap data.

While the capturing process, GUI messages are sent to the MessageSink callback function. The GUI messages help the user with the capturing process.

Returns:
0 if no error, otherwise an error code.

EnrollFingerPrint

public int EnrollFingerPrint()
Initiates the enrollment of a fingerprint. For the enrollment of a fingerprint, 3 fingerprints from the same finger are required.

This method returns immediately. The caller is getting notified through the StatusSink callback about the result. IFingerPrint.STATUS_ENROLL_OK or IFingerPrint.STATUS_ENROLL_FAILED are issued. If failed, GetLastErrorMsg() can be called for further information. IFingerPrint.STATUS_CANCELED is issued if the user cancels this operation. If the enrollment succeeded, call the GetFingerprintTemplateData() to get the created template.

GUI messages are send to the MessageSink callback function which will guide the user through the enrollment process.

Returns:
0 if no error, otherwise an error code.

VerifyFingerPrint

public int VerifyFingerPrint(byte[] templData)
Initiates the verification of a fingerprint. For verification, a previously generated template is needed. The fingerprint is then captured and verified against the template

This method returns immediately. The caller is getting notified through the StatusSink callback about the result. IFingerPrint.STATUS_VERIFY_OK or IFingerPrint.STATUS_VERIFY_FAILED are issued. If failed, GetLastErrorMsg() can be called for further information. If status is IFingerPrint.STATUS_VERIFY_FAILED and no error message is reported, the fingerprint was not verified. IFingerPrint.STATUS_CANCELED is issued if the user cancels this operation. Processed and Raw data of the fingerprint are not available here.

GUI messages are send to the MessageSink callback function which will guide the user through the verification process.

Parameters:
templData - A previously generated fingerprint template
Returns:
0 if no error, otherwise an error code.

VerifyMatchFingerPrint

public int VerifyMatchFingerPrint(byte[] templData,
                                  byte[] fpData)
Initiates the verification of a fingerprint. The difference to the VerifyFingerPrint method is, that here a previously captured fingerprint is passed in additional to the a previously generated template and is then verified (or matched) against this template. No fingerprint is captured with this method. This method returns immediately. The caller is getting notified through the StatusSink callback about the result. IFingerPrint.STATUS_MATCH_OK or IFingerPrint.STATUS_MATCH_FAILED are issued. If failed, GetLastErrorMsg() can be called for further information. If status is IFingerPrint.STATUS_MATCH_FAILED and no error message is reported, the fingerprint was not verified.

No GUI messages or fingerprint data are generated with this function

Parameters:
templData - A previously generated fingerprint template
fpData - A previously captured fingerprint (processed data)
Returns:
0 if no error, otherwise an error code.

GetLastErrorMsg

public java.lang.String GetLastErrorMsg()
This method returns the text of the last BioAPI error. These errors are specific to the fingerprint device and the BSP provided BioAPI.

Returns:
Text of the last error.

GetLastErrorNum

public int GetLastErrorNum()
This method returns the number of the last BioAPI error. These errors are specific to the fingerprint device and the BSP provided BioAPI.

Returns:
Error number.

GetFingerPrintProcessedData

public byte[] GetFingerPrintProcessedData()
This method returns a byte array with the processed data of the last fingerprint capture or verification process. This data can be used for VerifyMatch against a fingerprint template.

Returns:
Byte array of the processed fingerprint

GetFingerPrintRawData

public byte[] GetFingerPrintRawData()
This method returns a byte array with the raw data of the last fingerprint capture or verification process. This data can be used for visual display of the fingerprint.

Returns:
Byte array of the raw fingerprint data

GetFingerPrintTemplateData

public byte[] GetFingerPrintTemplateData()
This method returns a byte array with the template data of the last fingerprint enrollment process. The verify and verify-match functions require a template to verify against.

Returns:
Byte array of the template

run

public void run()
Run: default method (from start() call). Connects to the underlying CICFP DLL and initializes it.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

CIC iSign Version 1.2