TrustFingerSDK Windows Developer Guide 1.0.8
TrustFingerSDK Windows Developer Guide 1.0.8
Technical Support
Please visit the official website of Aratek http://www.aratek.co for more technical
support.
Feedback
Although we have reviewed and tested the documentation before it is released, if
1
Aratek TrustFinger™ SDK
you find any errors, omissions or better suggestions during use, please contact us:
Address: 2F, T2-A#, Hi-tech Park, Nanshan District, Shenzhen, Guangdong, China
Telephone: +86-755-26719975
2
Aratek TrustFinger™ SDK
CONTENT
Preface .................................................................................................................................. 5
3
Aratek TrustFinger™ SDK
5.12 ARAFPSCAN_BeginLiveCapture............................................................................ 26
5.13 ARAFPSCAN_LiveCaptureRawData....................................................................... 27
5.14 ARAFPSCAN_LiveCaptureBitmap ......................................................................... 28
5.15 ARAFPSCAN_EndLiveCapture .............................................................................. 29
5.16 ARAFPSCAN_GetLedStatus .................................................................................. 30
5.17 ARAFPSCAN_SetLedStatus .................................................................................. 31
5.18 ARAFPSCAN_ExtractFeature ................................................................................ 32
5.19 ARAFPSCAN_ExtractANSIFeature ......................................................................... 32
5.20 ARAFPSCAN_ExtractISOFeature ........................................................................... 33
5.21 ARAFPSCAN_GetISOFeatureLength ...................................................................... 34
5.22 ARAFPSCAN_GetANSIFeatureLength.................................................................... 34
5.23 ARAFPSCAN_GeneralizeTemplate ........................................................................ 35
5.24 ARAFPSCAN_Verify ............................................................................................. 36
5.25 ARAFPSCAN_RawToBitmap ................................................................................. 37
5.26 ARAFPSCAN_BitmapToRaw ................................................................................. 38
5.27 ARAFPSCAN_RawToWSQ .................................................................................... 39
5.28 ARAFPSCAN_ImageQuality.................................................................................. 40
5.29 ARAFPSCAN_GetNFIQScore................................................................................. 40
5.30 ARAFPSCAN_EnableLFD ...................................................................................... 41
5.31 ARAFPSCAN_GetErrorInfo ................................................................................... 42
4
Aratek TrustFinger™ SDK
Preface
Aratek has been in the business of helping millions manage their digital identity
throughout the globe for more than 14 years. We are dedicated to provide
cost-effective products and solutions for governments and organizations with
sophisticated end-to-end product portfolio ranging from software to fingerprint
scanners and multi-functional biometrics terminals.
5
Aratek TrustFinger™ SDK
ANSI
ISO
When using ISO/ANSI standard, the following standards data type format are
supported:
7
Aratek TrustFinger™ SDK
2 Getting started
8
Aratek TrustFinger™ SDK
3 Developing Application
Step 2.Call ARAFPSCAN_GetImageInfo to get the width, height and dpi of the image
from fingerprint reader.
9
Aratek TrustFinger™ SDK
2. Live Mode.
Step 1. Call ARAFPSCAN_OpenDevice to open the device and get the handle of the
fingerprint reader.
HANDLE hDevic;
ret = ARAFPSCAN_OpenDevice(&hDevic, 0);
Step 2. Call ARAFPSCAN_GetImageInfo to get the width, height and dpi of the image
from fingerprint reader.
The real-time fingerprint image stream can be obtained by calling this API recursively.
10
Aratek TrustFinger™ SDK
int *nChanCount = 0;
ret= ARAFPSCAN_GetDeviceCount(nChanCount);
9. Save template
10. After enrollment, save the template to a disk
We have run strict tests inside Aratek using a huge database sample, and the
following are the SDK performance results:
Aratek TrustFingrt SDK provides 5 security levels. The relationship with Matching
threshold, FAR and security levels is as in below table:
1 1% 24
2 0.5% 30
3 0.1% 36
4 0.01% 48
5 0.0001% 60
12
Aratek TrustFinger™ SDK
3 Right middle
4 Right ring
5 Right little
6 Left thumb
7 Left index
8 Left middle
9 Left ring
10 Left little
13
Aratek TrustFinger™ SDK
4 Device setting
To work with Aratek Finger scanners, make a device initialization first. The SDK will
automatically load the finger scanner driver to the connected machine.
Next, make a connection to finger scanner. In general, a single device can only
connect one finger scanner. However in some cases, multiple scanners may be
connected to the same device. TrustFinger™ SDK could open any special finger
scanner. The finger scanner mounting capability of each single PC is 10.
Finally, retrieve the finger scanner device information such as SN, image size etc.
14
Aratek TrustFinger™ SDK
15
Aratek TrustFinger™ SDK
5 API Description
5.1 ARAFPSCAN_GlobalInit
Prototype:
5.2 ARAFPSCAN_GlobalFree
Prototype:
5.3 ARAFPSCAN_GetDeviceCount
Prototype:
16
Aratek TrustFinger™ SDK
device.
Parameter:
Parameter Type Description
nDeviceCount OUT Number of Aratek fingerprint devices
Return:
5.4 ARAFPSCAN_OpenDevice
Prototype:
API DLL int __stdcall ARAFPSCAN_OpenDevice(HANDLE *nHandle, int
nIndex);
Description:
If want to open a specified Aratek fingerprint reader, follow below steps:
Call getDeviceCount() to get number of readers that are present.
The reader are with index in scope 0 to number of readers – 1.
Open by reader index.
If the reader is not present, return error code is -100.
Parameter:
17
Aratek TrustFinger™ SDK
5.5 ARAFPSCAN_CloseDevice
Prototype:
API DLL int __stdcall ARAFPSCAN_CloseDevice(HANDLE *nHandle)
Description:
Close fingerprint device.
Parameter:
Parameter Type Description
nHandle IN Device handle
Return code:
Return code Description
0 Close device successfully
-102 SDK has not been initialized
-103 Device did not open
5.6 ARAFPSCAN_GetImageInfo
Prototype:
18
Aratek TrustFinger™ SDK
5.7 ARAFPSCAN_GetDeviceDescription
Prototype:
int __stdcall ARAFPSCAN_GetDeviceDescription(const int
API DLL
deviceIndex, ARAFP_DeviceDesc *pDeviceDesc)
Description:
Get Aratek fingerprint reader info.
Parameter:
Parameter Type Description
deviceIndex IN Device index
5.8 ARAFPSCAN_CaptureRawData
Prototype:
int __stdcall ARAFPSCAN_CaptureRawData(HANDLE nHandle, int
API DLL
nTimeout,unsigned char *pRawData)
Description:
Collect raw image from fingerprint reader. when nTimeout = 0, reader will return
the raw image directly.
Parameter:
Parameter Type Description
5.9 ARAFPSCAN_CaptureBitmapData
Prototype:
API DLL int __stdcall ARAFPSCAN_CaptureBitmapData(HANDLE nHandle,
21
Aratek TrustFinger™ SDK
22
Aratek TrustFinger™ SDK
-132 No Finger
-903 Invalid error
-904 Invalid firmware
5.10ARAFPSCAN_CaptureISOData
Prototype:
int __stdcall ARAFPSCAN_CaptureISOImageData(HANDLE
API DLL nHandle, int nTimeout, int FingerPos, int Imgcompressalg,
unsigned char *ISOImgData, int *pLenOutput);
Description:
Get an ISO format image. The required image will be returned when a good
quality fingerprint image is detected.
Parameter:
23
Aratek TrustFinger™ SDK
24
Aratek TrustFinger™ SDK
5.11ARAFPSCAN_CaptureANSIData
Prototype:
int __stdcall ARAFPSCAN_CaptureANSIData (HANDLE nHandle, int
API DLL nTimeout, int FingerPos, int Imgcompressalg, unsigned char
*ISOImgData, int *pLenOutput);
Description:
Get an ANSI format image. The required image will be returned when a good
quality fingerprint image is detected.
Parameter:
Parameter Type Description
nHandle IN Device handler
Timeout for image capture, unit is second, recommend
nTimeout IN
to set as 5
FingerPos IN Finger position index.
Image compression algorithm setting
UnCompressed = 0
BitPacked = 1 (Not supported yet)
Imgcompress
IN WSQ = 2
alg
JPEG = 3 (Not supported yet)
JPEG2000 = 4 (Not supported yet)
PNG = 5 (Not supported yet)
ISOImgData OUT Required format image buffer
pLenOutput OUT Required format image size
Return code:
Return Code Description
0 Get required format image successful
10 Failed to allocate memory
-100 Device is not present
25
Aratek TrustFinger™ SDK
5.12ARAFPSCAN_BeginLiveCapture
Prototype:
API DLL int __stdcall ARAFPSCAN_BeginLiveCapture (HANDLE nHandle);
Description:
Inform reader to start image capture. Call this API before uploading an image.
Parameters:
Parameter Type Description
nHandle IN Device handler
26
Aratek TrustFinger™ SDK
Return code:
Return code Description
0 Get BMP image successful
-102 SDK did not initialize
5.13ARAFPSCAN_LiveCaptureRawData
Prototype:
int __stdcall ARAFPSCAN_LiveCaptureRawData (HANDLE
API DLL
nHandle, unsigned char *pRawData);
Description:
Get live RAW image, call this API continuously for live capture.
This API returns the image immediately, without extra image quality check filters.
Call ARAFPSCAN_EndLiveCapture to stop live capture
Parameter:
Parameter Type Description
27
Aratek TrustFinger™ SDK
5.14ARAFPSCAN_LiveCaptureBitmap
Prototype:
int __stdcall ARAFPSCAN_LiveCaptureBitmap (HANDLE nHandle,
API DLL
unsigned char *pBmpData);
Description:
Get live BMP image, call this API continuously for live capture.
This API returns the image immediately, without extra image quality check filters.
Call ARAFPSCAN_EndLiveCapture can stop live capture
Parameter:
Parameter Type Description
nHandle IN Device handler
pBmpData OUT BMP image data buffer, 1078 bytes BMP header and
28
Aratek TrustFinger™ SDK
5.15ARAFPSCAN_EndLiveCapture
Prototype:
29
Aratek TrustFinger™ SDK
5.16ARAFPSCAN_GetLedStatus
Prototype:
int __stdcall ARAFPSCAN_GetLedStatus(HANDLE nHandle,int
API DLL
nLedIndex, int *pStatus)
Description:
Get fingerprint reader LED indicator status (if the device has LED).
Parameter:
Parameter Type Description
nHandle IN Device handler
30
Aratek TrustFinger™ SDK
5.17ARAFPSCAN_SetLedStatus
Prototype:
int __stdcall ARAFPSCAN_SetLedStatus(HANDLE nHandle, int
API DLL
nLedIndex, int nLedStatus)
Description:
Set fingerprint reader LED indicator status (if the device has LED).
Parameter:
Parameter Type Description
31
Aratek TrustFinger™ SDK
5.18ARAFPSCAN_ExtractFeature
Prototype:
int __stdcall ARAFPSCAN_ExtractFeature(HANDLE nHandle,
API DLL int cFingerPos,
unsigned char * pFeatureData)
Description:
Extract Aratek Bione® format feature from a RAW image.
Parameter:
Parameter Type Description
5.19ARAFPSCAN_ExtractANSIFeature
Prototype:
int __stdcall ARAFPSCAN_ExtractANSIFeature (HANDLE nHandle,
API DLL int cFingerPos,
unsigned char * pFeatureData)
Description:
32
Aratek TrustFinger™ SDK
5.20ARAFPSCAN_ExtractISOFeature
Prototype:
int __stdcall ARAFPSCAN_ExtractISOFeature (HANDLE nHandle,
API DLL int cFingerPos,
unsigned char * pFeatureData)
Description:
Extract ISO format feature from a RAW image.
Parameter:
33
Aratek TrustFinger™ SDK
5.21ARAFPSCAN_GetISOFeatureLength
Prototype:
Description:
Get length from ISO feature.
Parameter:
Parameter Type Description
Return code:
5.22ARAFPSCAN_GetANSIFeatureLength
Prototype:
34
Aratek TrustFinger™ SDK
*pFeatureData,int &length)
Description:
Get length from ANSI feature.
Parameter:
Parameter Type Description
Return code:
5.23ARAFPSCAN_GeneralizeTemplate
Prototype:
int __stdcall ARAFPSCAN_GeneralizeTemplate(HANDLE nHandle,
unsigned char * pFeatureData1,
API DLL unsigned char * pFeatureData2,
unsigned char * pFeatureData3,
unsigned char * pTemplateData)
Description:
Combine 3 features as 1 template.
Parameter:
Parameter Type Description
nHandle IN Device handler
pFeatureData1 IN Feature data
35
Aratek TrustFinger™ SDK
5.24ARAFPSCAN_Verify
Prototype:
int __stdcall ARAFPSCAN_Verify(HANDLE nHandle,
int nSecurityLevel,
API DLL unsigned char * pFeatureData,
unsigned char * pTemplateData,
int *pnSimilarity, int *presult)
Description:
Verify one feature from another (from database). This API has 4 parameters,
securityLevel: 1 to 5, with 5 being the most secure; the default setting is 4. The other
2 parameters are template entrance, the format shall be ARATEK AUF, ANSI or ISO.
Aratek TrustFingrt SDK provides 5 security levels. The relationship with Matching
threshold, FAR and security levels is presented in the table below:
Level FAR(False accept ratio) Threshold
1 1% 24
2 0.5% 30
3 0.1% 36
36
Aratek TrustFinger™ SDK
4 0.01% 48
5 0.001% 60
Parameter:
MEDIUM
pFeatureData IN Fingerprint feature data
pTemplateData IN Fingerprint feature data
pnSimilarity OUT Output similarity about 2 features
5.25ARAFPSCAN_RawToBitmap
Prototype:
int __stdcall ARAFPSCAN_RawToBitmap(unsigned char*
pRawData,
API DLL
unsigned char* pBmpData,
int nWidth, int nHeight)
Description:
37
Aratek TrustFinger™ SDK
5.26ARAFPSCAN_BitmapToRaw
Prototype:
int __stdcall ARAFPSCAN_BitmapToRaw(unsigned char*
pBmpData,
API DLL
unsigned char* pRawData,
int pnWidth, int pnHeight)
Description:
Convert BMP image to RAW.
Parameter:
Parameter Type Description
38
Aratek TrustFinger™ SDK
0 Convert successful
10 Passing un-allocated memory
-102 SDK did not initialize
-900 Invalid parameter
5.27ARAFPSCAN_RawToWSQ
Prototype:
int __stdcall ARAFPSCAN_RawToWSQ(unsigned char* pRawData,
API DLL int nWidth, int nHeight, int dpi, double bitrate, unsigned char*
pWSQData, int *lengthWSQ)
Description:
Compress raw image data into image data in WSQ format.
Parameter:
Parameter Type Description
pRawData IN Raw image data
nWidth IN Image width
nHeight IN Image height
dpi IN Image dpi
39
Aratek TrustFinger™ SDK
5.28ARAFPSCAN_ImageQuality
Prototype:
int __stdcall ARAFPSCAN_ImgQuality(int width, int height,
API DLL
unsigned char *ipImage, unsigned char *Quality)
Description:
Get raw image quality. The output score is in a range from 0 to 100; higher score
means better image quality.
Parameter:
Parameter Type Description
5.29ARAFPSCAN_GetNFIQScore
Prototype:
API DLL int __stdcall ARAFPSCAN_GetNFIQScore(int width, int height,
40
Aratek TrustFinger™ SDK
5.30ARAFPSCAN_EnableLFD
Prototype:
int __stdcall ARAFPSCAN_EnableLFD(HANDLE nHandle, bool
API DLL
pEnable, int LFD_Level)
Description:
Turn the LFD function on or off, and affect all the capturing interfaces after
opening the LFD.(Only supported by A600)
Parameter:
Parameter Type Description
41
Aratek TrustFinger™ SDK
Return code:
Return code Description
5.31ARAFPSCAN_GetErrorInfo
Prototype:
43
Aratek TrustFinger™ SDK
44
Aratek TrustFinger™ SDK
45
Aratek TrustFinger™ SDK
46