com.griaule.grFinger
Class GrFinger

java.lang.Object
  extended by com.griaule.grFinger.GrFinger

public class GrFinger
extends Object

This is the GrFinger Library Java main class. This class includes all GrFinger library features.


Field Summary
static int GR_DEFAULT_DIM
          The default dimension.
static int GR_DEFAULT_RES
          The default resolution.
static int GR_DEFAULT_USED
          The supplied value is invalid or out of range.
static int GR_LOW_FAR
          Threshold value that defines a low FAR of 1 in 10000.
static int GR_LOW_FRR
          Threshold value that defines a low FRR of 1 in 1000.
static int GR_MAX_IMAGE_HEIGHT
          Maximum image height.
static int GR_MAX_IMAGE_WIDTH
          Maximum image width
static int GR_MAX_RESOLUTION
          Maximum image resolution in DPI.
static int GR_MAX_SIZE_TEMPLATE
          Maximum template size.
static int GR_MAX_THRESHOLD
          Maximum threshold value.
static int GR_MIN_IMAGE_HEIGHT
          Minimum image height.
static int GR_MIN_IMAGE_WIDTH
          Minimum image width.
static int GR_MIN_RESOLUTION
          Minimum image resolution in DPI.
static int GR_MIN_THRESHOLD
          Minimum threshold value.
static int GR_OK
          No error.
static int GR_ROT_MAX
          Maximum rotation tolerance.
static int GR_ROT_MIN
          Minimum rotation tolerance.
static int GR_VERYLOW_FAR
          Threshold value that defines a very low FAR of 1 in 100000.
static int GR_VERYLOW_FRR
          Threshold value that defines a very low FRR of 1 in 100.
 
Constructor Summary
GrFinger()
          Default GrFinger constructor.
 
Method Summary
 FingerprintTemplate extract(FingerprintImage image, Context context)
          Extracts a template from the supplied fingerprint image.
 void finalize()
           
 void finalizeCapture()
          Finalizes the capture module and free associated resources.
 ImageProducer getBiometricDisplay(FingerprintTemplate template, FingerprintImage img, Context matchContext)
          Returns an ImageProducer object to show a biometric image on screen.
 MatchParameters getIdentifyParameters(Context context)
          Get the identification parameters for the given context.
 MatchParameters getVerifyParameters(Context context)
          Get the verification parameters for the given context.
 Version getVersion()
          Get the library version and the license type.
 MatchingResult identify(FingerprintTemplate templateReference, Context context)
          Identify the supplied reference template against a previously prepared query template.
 void identifyPrepare(FingerprintTemplate templateQuery, Context context)
          Prepare a query template to be identified against reference templates.
 void initializeCapture(StatusCallBack statusEventHandler)
          Initializes the capture module.
 void loadImageFromFile(String fileName, int resolution)
          Load an image from a file.
 void setBiometricDisplayColors(Color minutiaeColor, Color minutiaeMatchedColor, Color segmentColor, Color segmentMatchedColor, Color directionColor, Color directionMatchedColor)
          Set the colors for a biometric data (minutiae, segments and minutiae direction).
 int setIdentifyParameters(MatchParameters matchParameters, Context context)
          Set the identification parameters in the given context.
 int setVerifyParameters(MatchParameters matchParameters, Context context)
          Set the verification parameters in the given context.
 void startCapture(String idSensor, FingerCallBack fingerEventHandler, ImageCallBack imageEventHandler)
          Start capturing images from the sensor defined by "idSensor".
 void stopCapture(String idSensor)
          Stop capturing images from the given sensor.
 MatchingResult verify(FingerprintTemplate queryTemplate, FingerprintTemplate referenceTemplate, Context context)
          Performs verification confronting two given templates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GR_OK

public static final int GR_OK
No error.

See Also:
Constant Field Values

GR_DEFAULT_USED

public static final int GR_DEFAULT_USED
The supplied value is invalid or out of range. Default values will be used.

See Also:
Constant Field Values

GR_DEFAULT_RES

public static final int GR_DEFAULT_RES
The default resolution.

See Also:
Constant Field Values

GR_DEFAULT_DIM

public static final int GR_DEFAULT_DIM
The default dimension.

See Also:
Constant Field Values

GR_MAX_SIZE_TEMPLATE

public static final int GR_MAX_SIZE_TEMPLATE
Maximum template size.

See Also:
Constant Field Values

GR_MAX_IMAGE_WIDTH

public static final int GR_MAX_IMAGE_WIDTH
Maximum image width

See Also:
Constant Field Values

GR_MAX_IMAGE_HEIGHT

public static final int GR_MAX_IMAGE_HEIGHT
Maximum image height.

See Also:
Constant Field Values

GR_MAX_RESOLUTION

public static final int GR_MAX_RESOLUTION
Maximum image resolution in DPI.

See Also:
Constant Field Values

GR_MIN_IMAGE_WIDTH

public static final int GR_MIN_IMAGE_WIDTH
Minimum image width.

See Also:
Constant Field Values

GR_MIN_IMAGE_HEIGHT

public static final int GR_MIN_IMAGE_HEIGHT
Minimum image height.

See Also:
Constant Field Values

GR_MIN_RESOLUTION

public static final int GR_MIN_RESOLUTION
Minimum image resolution in DPI.

See Also:
Constant Field Values

GR_MAX_THRESHOLD

public static final int GR_MAX_THRESHOLD
Maximum threshold value.

See Also:
Constant Field Values

GR_MIN_THRESHOLD

public static final int GR_MIN_THRESHOLD
Minimum threshold value.

See Also:
Constant Field Values

GR_VERYLOW_FRR

public static final int GR_VERYLOW_FRR
Threshold value that defines a very low FRR of 1 in 100.

See Also:
Constant Field Values

GR_LOW_FRR

public static final int GR_LOW_FRR
Threshold value that defines a low FRR of 1 in 1000.

See Also:
Constant Field Values

GR_LOW_FAR

public static final int GR_LOW_FAR
Threshold value that defines a low FAR of 1 in 10000.

See Also:
Constant Field Values

GR_VERYLOW_FAR

public static final int GR_VERYLOW_FAR
Threshold value that defines a very low FAR of 1 in 100000.

See Also:
Constant Field Values

GR_ROT_MIN

public static final int GR_ROT_MIN
Minimum rotation tolerance.

See Also:
Constant Field Values

GR_ROT_MAX

public static final int GR_ROT_MAX
Maximum rotation tolerance.

See Also:
Constant Field Values
Constructor Detail

GrFinger

public GrFinger()
         throws GrErrorException
Default GrFinger constructor.

Throws:
GrErrorException
Method Detail

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

initializeCapture

public void initializeCapture(StatusCallBack statusEventHandler)
                       throws GrErrorException
Initializes the capture module. The given StatusCallBack class will handle the status events (e.g., for a sensor being plugged or unplugged).

Parameters:
statusEventHandler - A class that implements the StatusCallBack interface.
Throws:
GrErrorException
See Also:
StatusCallBack

finalizeCapture

public void finalizeCapture()
                     throws GrErrorException
Finalizes the capture module and free associated resources.

Throws:
GrErrorException

startCapture

public void startCapture(String idSensor,
                         FingerCallBack fingerEventHandler,
                         ImageCallBack imageEventHandler)
                  throws GrErrorException
Start capturing images from the sensor defined by "idSensor". When a finger is placed on or removed from the sensor, a finger event is raised and the class fingerEventHandleris called. When an image is captured, an image event is raised and imageEventHandler is called.

Parameters:
idSensor - The identification of the sensor that you want to capture from. The sensor must be already connected.
fingerEventHandler - Implementation of FingerEventHandler that will handle the finger events. This class will be called every time a finger is placed or removed from the sensor.
imageEventHandler - Implementation of ImageEventHandler that will handle the image events. This class will be called every time an image is captured.
Throws:
GrErrorException

stopCapture

public void stopCapture(String idSensor)
                 throws GrErrorException
Stop capturing images from the given sensor.

Parameters:
idSensor - The identification of the sensor that you want to stop capturing from.
Throws:
GrErrorException

loadImageFromFile

public void loadImageFromFile(String fileName,
                              int resolution)
                       throws GrErrorException
Load an image from a file. If the file is successfully opened, an image event is raised and the raw image is passed to the imageEventHandler class, defined in the startCapture method. Loading an image from a file acts the same way as if it was captured from a sensor.

Parameters:
fileName - The file name of the image to be loaded. This file must exist and you must have read access to it.
resolution - The resolution in dpi of the supplied image.
Throws:
GrErrorException
See Also:
startCapture(String, FingerCallBack, ImageCallBack)

extract

public FingerprintTemplate extract(FingerprintImage image,
                                   Context context)
                            throws GrErrorException
Extracts a template from the supplied fingerprint image.

Parameters:
image - The image to be extracted.
context - Context where the extraction will be executed.
Returns:
The fingerprint template.
Throws:
GrErrorException

verify

public MatchingResult verify(FingerprintTemplate queryTemplate,
                             FingerprintTemplate referenceTemplate,
                             Context context)
                      throws GrErrorException
Performs verification confronting two given templates.

Parameters:
queryTemplate - Query template to be verified.
referenceTemplate - Reference template to be verified.
context - Context where the verification will be performed.
Returns:
Returns the matching result.
Throws:
GrErrorException

identifyPrepare

public void identifyPrepare(FingerprintTemplate templateQuery,
                            Context context)
                     throws GrErrorException
Prepare a query template to be identified against reference templates. This is a mandatory step to perform fingerprint identification using the identify method.

Parameters:
templateQuery - Query template to be identified.
context - Context where the identification will be performed.
Throws:
GrErrorException
See Also:
identify(FingerprintTemplate, Context)

identify

public MatchingResult identify(FingerprintTemplate templateReference,
                               Context context)
                        throws GrErrorException
Identify the supplied reference template against a previously prepared query template. The identification must be previously prepared by calling the method identifyPrepare. While performing identification, no method should be called between identifyPrepare and all calls to identify. If one tries to call identify after any other method than identifyPrepare or some previous call of identify, it will throw an exception.

Parameters:
templateReference - Reference template to be identified.
context - Context where the identification will be performed.
Returns:
The matching result.
Throws:
GrErrorException
See Also:
identifyPrepare(FingerprintTemplate, Context)

setIdentifyParameters

public int setIdentifyParameters(MatchParameters matchParameters,
                                 Context context)
                          throws GrErrorException
Set the identification parameters in the given context.

Parameters:
matchParameters - The identification match parameters.
context - Context in which the parameters will be set.
Returns:
GR_OK or GR_DEFAULT_USED if the parameters are out of bound.
Throws:
GrErrorException

setVerifyParameters

public int setVerifyParameters(MatchParameters matchParameters,
                               Context context)
                        throws GrErrorException
Set the verification parameters in the given context.

Parameters:
matchParameters - The verification match parameters.
context - Context in which the parameters will be set.
Returns:
GR_OK or GR_DEFAULT_USED if the parameters are out of bound.
Throws:
GrErrorException

getIdentifyParameters

public MatchParameters getIdentifyParameters(Context context)
                                      throws GrErrorException
Get the identification parameters for the given context.

Parameters:
context - Context where the parameter will be get from.
Returns:
The identification parameters.
Throws:
GrErrorException

getVerifyParameters

public MatchParameters getVerifyParameters(Context context)
                                    throws GrErrorException
Get the verification parameters for the given context.

Parameters:
context - Context where the parameter will be get from.
Returns:
The verification parameters.
Throws:
GrErrorException

getBiometricDisplay

public ImageProducer getBiometricDisplay(FingerprintTemplate template,
                                         FingerprintImage img,
                                         Context matchContext)
                                  throws GrErrorException
Returns an ImageProducer object to show a biometric image on screen. This ImageProducer should be used with the Component.createImage() method.

Parameters:
template - template that must be displayed.
img - fingerprint image used to extract template
matchContext - context in which the match (identification or verification) was made or Context.GR_NO_CONTEXT if match information must not be displayed.
Returns:
An ImageProducer object.
Throws:
GrErrorException
See Also:
Component.createImage(java.awt.image.ImageProducer), setBiometricDisplayColors(Color, Color, Color, Color, Color, Color)

setBiometricDisplayColors

public void setBiometricDisplayColors(Color minutiaeColor,
                                      Color minutiaeMatchedColor,
                                      Color segmentColor,
                                      Color segmentMatchedColor,
                                      Color directionColor,
                                      Color directionMatchedColor)
                               throws GrErrorException
Set the colors for a biometric data (minutiae, segments and minutiae direction). If the static field GrFinger.GR_IMAGE_NO_COLOR is used as color code, the corresponding biometric data will not be displayed on image.

Parameters:
minutiaeColor - minutiae color
minutiaeMatchedColor - matching minutiae color
segmentColor - segments color
segmentMatchedColor - matching segments color
directionColor - minutiae direction color
directionMatchedColor - matching minutiae direction color
Throws:
GrErrorException
See Also:
getBiometricDisplay(FingerprintTemplate, FingerprintImage, Context)

getVersion

public Version getVersion()
                   throws GrErrorException
Get the library version and the license type.

Returns:
Version object with the version information.
Throws:
GrErrorException