0% found this document useful (0 votes)
771 views

TrustFingerSDK Windows Developer Guide 1.0.8

ers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
771 views

TrustFingerSDK Windows Developer Guide 1.0.8

ers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

ARATEK BIOMETRICS

TrustFinger SDK for Windows v1.0.8

Application Developer Guide

www.aratek.co | Secure with Ease, Identity with Faith


Aratek TrustFinger™ SDK

© 2018 Aratek, Inc. All Rights Reserved.


All intellectual property rights in the Aratek software, firmware, hardware and
documentation contained in or described in this guide are owned by Aratek or its
suppliers and are subject to Chinese Copyright. Laws. Other applicable protection
under copyright laws and international treaty provisions.
Aratek and its suppliers reserve all rights not expressly granted in this document.
TrustFingerTM and Bione® are registered trademarks of Aratek Biometrics, Inc., in
China and other countries.
Windows, Windows Server 2008/2012, Windows Vista, Windows 7 and Windows XP
are registered trademarks of Microsoft Corporation.
All other trademarks are the property of their respective owners.
This document and the software it describes are licensed under the terms of the
License Agreement. No part of this document may be reproduced, stored,
transmitted, or translated in any form or by any means without the prior written
permission of Aratek Biometrics, Inc., unless otherwise permitted.
The contents of this manual are for reference only and are subject to change without
notice.
Any mention of third-party companies and products is for demonstration purposes
only and does not constitute an endorsement or recommendation.
Aratek assumes no responsibility for the performance or use of these third-party
products. Aloha will make every effort to ensure the accuracy of its documentation
and assume no responsibility or liability for any errors or inaccuracies that may arise.

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:

[email protected]

Address: 2F, T2-A#, Hi-tech Park, Nanshan District, Shenzhen, Guangdong, China
Telephone: +86-755-26719975

2
Aratek TrustFinger™ SDK

CONTENT
Preface .................................................................................................................................. 5

1 TrustFinger™ SDK Introduction ......................................................................................... 6

1.1 Fingerprint data format and standard .................................................................... 6


1.2 Systems Requirements.......................................................................................... 7
1.3 Support Device List ............................................................................................... 7

2 Getting started ................................................................................................................ 8

2.1 SDK Structure Description ..................................................................................... 8


2.2 SDK Directory Description ..................................................................................... 8

3 Developing Application .................................................................................................... 9

3.1 Initialize SDK ........................................................................................................ 9


3.2 Capture Fingerprint .............................................................................................. 9
3.3 Fingerprint Enrollment........................................................................................ 11
3.4 Fingerprint Verification ....................................................................................... 12
3.5 Fingerprint Minutiae / Image Formats and Standards ........................................... 13

4 Device setting ............................................................................................................... 14

4.1 Get device description ........................................................................................ 14


4.2 LED Light Operation ............................................................................................ 15

5 API Description ............................................................................................................. 16

5.1 ARAFPSCAN_GlobalInit ....................................................................................... 16


5.2 ARAFPSCAN_GlobalFree ..................................................................................... 16
5.3 ARAFPSCAN_GetDeviceCount ............................................................................. 16
5.4 ARAFPSCAN_OpenDevice ................................................................................... 17
5.5 ARAFPSCAN_CloseDevice.................................................................................... 18
5.6 ARAFPSCAN_GetImageInfo ................................................................................. 18
5.7 ARAFPSCAN_GetDeviceDescription ..................................................................... 19
5.8 ARAFPSCAN_CaptureRawData ............................................................................ 20
5.9 ARAFPSCAN_CaptureBitmapData ........................................................................ 21
5.10 ARAFPSCAN_CaptureISOData .............................................................................. 23
5.11 ARAFPSCAN_CaptureANSIData ............................................................................ 25

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

6 Appendix A: Error Codes ................................................................................................ 42

7 Appendix B: Supported Devices ...................................................................................... 44

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.

With our professional and experienced team, we are proud to offer:


- Complete and cost-effective product line
- Large scale manufacturing capacity
- Fast deployment capability
- Flexible specification configuration

5
Aratek TrustFinger™ SDK

1 TrustFinger™ SDK Introduction

The ARATEK TrsutFinger™ SDK is designed to enable third-party application


developers to harness the power of Aartek fingerprint scanners. The SDK gives
developers ability to capture and verify fingerprints from the sensor. Through the
SDK, application developers will be able to enhance the experience of their
application more conveniently and reliably. This opens up a whole new dimension of
interaction and enables new, richer scenarios for your applications.
The Aratek TrustFinger™ SDK includes the following features:
 Multi-platform support

 Multiple data type format support

 Access finger reader to capture fingerprint

 Perform fingerprint verification

The following subsections describe these features in more detail.

1.1 Fingerprint data format and standard


The Aratek TrustFinger™ SDK supports the fingerprint data formats listed below:
 ARATEK Bione®

 ANSI

 ISO

When using ISO/ANSI standard, the following standards data type format are
supported:

ANSI Standard ISO Standard


Fingerprint Image Data (FID) ANSI INCITS 381-2004 ISO/IEC 19794-4:2005
Fingerprint Minutiae Data
ANSI INCITS 378-2004 ISO/IEC 19794-2:2005
(FMD)
6
Aratek TrustFinger™ SDK

1.2 Systems Requirements


Windows
• IBM-compatible PC 486 or later
• 1 USB port (2.0 or higher)
• 64 MB RAM
• 80 MB available hard disk space
• Windows 10,7, 8, 8.1 / Vista / XP

1.3 Support Device List


TrustFinger™ SDK supports Aratek capacitive and optical fingerprint readers and
modules. Current version is compatible with A400 and A600 readers.
Please refer to Appendix B for more details.

7
Aratek TrustFinger™ SDK

2 Getting started

2.1 SDK Structure Description

2.2 SDK Directory Description


The SDK folder has the following folders:

Docs - SDK development documents.


Drivers - device driver.
Samples - demo project source code.
SDK - SDK dynamic library files.
Readme.txt - document structure and version update information.

8
Aratek TrustFinger™ SDK

3 Developing Application

3.1 Initialize SDK


Prior to using the SDK, you need to call the ARAFPSCAN_GlobalInit to initialize the
global environment. This process needs to be called only once, and is recommended
to be called at the start of the application.

int ret = ARAFPSCAN_GlobalInit ();

Before quitting the application, call ARAFPSCAN_GlobalFree to release the resources


that were allocated by the ARAFPSCAN_GlobalInit.

int ret = ARAFPSCAN_GlobalFree();

3.2 Capture Fingerprint


There are 2 types of image capture: Single mode and Live mode:
Single Mode: SDK returns the image once image quality is good enough.
Live Mode: SDK return the image immediately and continuously.
1. Single 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.

int width, height, Dpi;


ret = ARAFPSCAN_GetImageInfo(hDevic, &width,&height,&Dpi);

Step 3.Call ARAFPSCAN_CaptureRawData or ARAFPSCAN_CaptureBitmapData or


ARAFPSCAN_CaptureISOData or ARAFPSCAN_CaptureANSIData to get a frame image

9
Aratek TrustFinger™ SDK

from the fingerprint reader.


int size = width * height;
unsigned char* buffer = (unsigned char*)malloc(size);
ret = ARAFPSCAN_CaptureRawData(hDevic, 5, buffer);//capture a frame

int size = width * height + 1078;


unsigned char* buffer = (unsigned char*)malloc(size);
ret = ARAFPSCAN_CaptureBitmapData(hDevic, 5, buffer);// capture a frame

int size = width * height + 46;


unsigned char* buffer = (unsigned char*)malloc(size);
ret = ARAFPSCAN_CaptureISOData(hDevic, 5, buffer);//capture a frame

int size = width * height + 50;


unsigned char* buffer = (unsigned char*)malloc(size);
ret = ARAFPSCAN_CaptureANSIData(hDevic, 5, buffer);// capture a frame

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.

int width, height, Dpi;


ret = ARAFPSCAN_GetImageInfo(hDevic, &width,&height,&Dpi);

Step 3.Call ARAFPSCAN_BeginLiveCapture to start real-time capture.


ret = ARAFPSCAN_BeginLiveCapture(hDevic);//start capture

Step 4.Call ARAFPSCAN_LiveCaptureBitmap to get a real-time BMP format fingerprint


image.

int width, height, Dpi;


ret = ARAFPSCAN_GetImageInfo(hDevic, &width,&height,&Dpi);
unsigned char bmpData[width*height+1078];
ret = ARAFPSCAN_LiveCaptureBitmap(hDevic,bmpData);

The real-time fingerprint image stream can be obtained by calling this API recursively.
10
Aratek TrustFinger™ SDK

Step 5.Call ARAFPSCAN_EndLiveCapture to end capture.

3.3 Fingerprint Enrollment


To enroll a finger, follow the steps below:
1. Call ARAFPSCAN_GetDeviceCount to get the number of Aratek fingerprint
readers that are connected to the host device. An index number will be assigned
to all detected devices, ranging from 0 to the total number of devices -1. For
example, if there are 3 connected devices, the first device will have an index of 0,
the second device will be 1 and the third device will be assigned an index of 2.

int *nChanCount = 0;
ret= ARAFPSCAN_GetDeviceCount(nChanCount);

2. Call ARAFPSCAN_OpenDevice to open the reader and get its handle.


HANDLE hDevic;
ret = ARAFPSCAN_OpenDevice(&hDevic, 0);

3. Call ARAFPSCAN_GetImageInfo to get the image width, height and resolution

int width, height, Dpi;


ret = ARAFPSCAN_GetImageInfo(hDevic, &width,&height,&Dpi);

4. Select a finger and collect a single image


5. Image quality check
Call ARAFPSCAN_ImageQuality to check the image quality. The output score
range is between 0 to 100; higher score means better image quality. The
recommend value is 50. If image quality is lower than the specified threshold,
you need to recapture the image until it passes the image quality (as defined in
the threshold) before proceeding to the next step.
6. Call ARAFPSCAN_ExtractFeature to extract fingerprint image feature

unsigned char featurebuf[1024];


ret = ARAFPSCAN_ExtractFeature(hDevic, 0x63, featurebuf)

7. Repeat steps 4 to 6 three times to finish the enrollment


11
Aratek TrustFinger™ SDK

8. Merge the 3 features as 1 template.


unsigned char Templatebuf[1024];
ret = ARAFPSCAN_GeneralizeTemplate(hDevic, featurebuf1, featurebuf2,
featurebuf3, Templatebuf);

9. Save template
10. After enrollment, save the template to a disk

3.4 Fingerprint Verification


Below is the verify fingerprint API procedure:
int __stdcall ARAFPSCAN_Verify (HANDLE nHandle,
int nSecurityLevel,
unsigned char * pFeatureData,
unsigned char * pTemplateData,
int *pnSimilarity)

This API compares 2 Bione/ISO/ANSI/ compliance features (supports cross compare)


and outputs their similarities. SecurityLevel has 5 ranks ranging from level 1 to 5,
with level 5 being the most secure. The recommend setting is level 4.

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:

Level FAR(False accept ratio) Threshold

1 1% 24

2 0.5% 30

3 0.1% 36

4 0.01% 48

5 0.0001% 60

12
Aratek TrustFinger™ SDK

3.5 Fingerprint Minutiae / Image Formats and Standards


TrustFinger™ SDK supports 3 minutiae / image support ANSI/ISO /Bione ® formats.
Use the API in the table can get specified format:
Function Description
ARAFPSCAN_ExtractFeature ARATEK Bione® Minutiae format
ARAFPSCAN_ExtractANSIFeature ANSI standard Format

ARAFPSCAN_ExtractISOFeature ISO standard Format


When using the extract fingerprint feature, you need to specify the finger position
index also, which is listed in the table below:
Index Finger Name
0 Unknown
1 Right thumb
2 Right index

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.

4.1 Get device description


Call function to get device description
int deviceIndex = 0;
ARAFP_DevDesc* desc = (ARAFP_DevDesc*)malloc(sizeof(ARAFP_DevDesc));
ret = ARAFPSCAN_GetDeviceDescription(deviceIndex, desc);

Field Description Sample

char serialNumber[32] Device unique id A400180815000001

char manufacturer[32] Manufacturer Aratek

char productName[64] Product name A400 Fingerprint Scanner

char productModel[32] Product model name A400

char fwVersion[32] Firmware version 1800

char hwVersion[32] Hardware version 12

int imageWidth Image pixell width 256

int imageHeight Image pixel height 360

int Dpi Sensor DPI 500

unsigned short modelId Device model ID 400

bool isUSBSupported USB conncetd or not true

14
Aratek TrustFinger™ SDK

bool isUARTSupported support UART connect or not false

bool isSPISupported Support SPI connected or not false

bool isLedSupported Support LED operate or not false

4.2 LED Light Operation


The API ARAFPSCAN_GetLedStatus can get the status of the LED light. At present, LED
lights are only open and closed in two states.
The API ARAFPSCAN_SetLedStatus can set the status of the LED light. 1 means
open, 0 means close.
The number of LED lights on the fingerprint reader depends on the actual model of
the product. TrustFingerTM SDK assigns the index number for each LED light, and
the index number is arranged from 0. If the device does not have an LED light, the
API will return the -104 error code, indicating that the device does not support the
operation.
Device model IsSupported Description
A400 NO
Include 2 LED lights
A600 YES Open 1 LED light,red light on
Open 0 LED light,green light on

15
Aratek TrustFinger™ SDK

5 API Description

5.1 ARAFPSCAN_GlobalInit
Prototype:

API DLL int __stdcall ARAFPSCAN_GlobalInit ()


Description:
Initializes the SDK running environment. This process needs to be called only
once, and is recommended to be called at the beginning of the application.
Return:
Return code Description
0 Initialize the SDK successfully
-115 SDK already has been initialized

5.2 ARAFPSCAN_GlobalFree
Prototype:

API DLL int __stdcall ARAFPSCAN_GlobalFree ()


Description:
Release the resource applied by initialization process.
Return:
Return code Description
0 Release the SDK successfully
-102 SDK has not been initialized

5.3 ARAFPSCAN_GetDeviceCount
Prototype:

API DLL int __stdcall ARAFPSCAN_GetDeviceCount(int *nDeviceCount);


Description:
Get the number of Aratek fingerprint readers that are connected to the host

16
Aratek TrustFinger™ SDK

device.
Parameter:
Parameter Type Description
nDeviceCount OUT Number of Aratek fingerprint devices
Return:

Return code Description


0 Get number of device successfully
-102 SDK has not been initialized

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:

Parameter Type Description


nHandle OUT Output parameters. Device Handle.
nIndex IN Fingerprint device index number.
Return:
Return code Description
0 Open fingerprint device successfully

-100 Device is not present


-102 SDK has not been initialized

17
Aratek TrustFinger™ SDK

-117 Device already has been opened


-118 Failed to get device info
-200 Failed to initialize fingerprint algorithm library

-900 Invalid parameter

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:

int __stdcall ARAFPSCAN_GetImageInfo(HANDLE nHandle, int


API DLL
*pnWidth,int *pnHeight, int *pnDpi)
Description:
Get width, height, and resolution info about the image captured from the
present reader.
Parameter:
Parameter Type Description

18
Aratek TrustFinger™ SDK

nHandle IN Device handle


pnWidth OUT Image width (pixel)
pnHeight OUT Image height (pixel)

pnDpi OUT Image resolution


Return code:
Return code Description
0 Get image info successful
-102 SDK has not been initialized
-103 Device did not open

-900 Invalid parameter

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

pDeviceDesc OUT Device description structure


typedef struct ARAFP_DeviceDesc
{
char serialNumber[32]; /* Device serial number */
char companyName[32]; /* company name */
char productName[64]; /* Device product name */
char productModel[32]; /* Device product model */
char fwVersion[32]; /* Device firmware version */
char hwVersion[32]; /* Device revision */
19
Aratek TrustFinger™ SDK

int imageWidth; /*Device capture max image width*/


int imageHeight;/*Device capture max image height*/
int Dpi; /*Device capture max image DPI*/
unsigned short modelId;/*Device Model id*/
bool isUSBSupported; // device support USE connected type or not
bool isUARTSupported; //device suppport UART or not
bool isSPISupported; //device support SPI or not
bool IsLedSupported; //device support led or not
};
Return code:
Return code Description
0 Get device info successful
10 Memory is not enough

-100 Device is not present


-118 Failed to get device info

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

nHandle IN Device handle


nTimeout IN Timeout, recommend set to 5
pRawData OUT Returned raw image
Return code:
20
Aratek TrustFinger™ SDK

Return code Description


0 Get image successful
10 Failed to allocate memory

-100 Device is not present


-102 SDK has not been initialized
-103 Device did not open
-104 Device not supported
-112 Failed to capture image
-113 Image capture timed out

-114 Device is busy


-119 Communication error
-120 Communication protocol not supported
-121 Invalid command
-122 Encode failure
-123 Decode failure

-124 Finger is too dry


-125 Finger is too moist
-126 Finger has few minutiaes
-130 Fake Finger
-131 Unknown Finger
-132 No Finger

-900 Invalid parameter


-903 Invalid error
-904 Invalid firmware

5.9 ARAFPSCAN_CaptureBitmapData
Prototype:
API DLL int __stdcall ARAFPSCAN_CaptureBitmapData(HANDLE nHandle,

21
Aratek TrustFinger™ SDK

int nTimeout, unsigned char *pBmpData);


Description:
Collect a single BMP image.
Parameter:
Parameter Type Description

nHandle IN Device handler


Timeout for image capture, unit is second, recommend
nTimeout IN
to set as 5.
BMP image data buffer, 1078 bytes BMP header and
pBmpData OUT
8BPP gray scale raw image data.
Return code:
Return code Description
0 Get image successful

10 Failed to allocate memory


-100 Device is not present
-102 SDK has not been initialized
-103 Device did not open
-104 Device not supported
-112 Failed to capture image

-113 Image capture timed out


-114 Device is busy
-119 Communication error
-120 Communication protocol not supported
-121 Invalid command
-122 Encode failure

-123 Decode failure


-124 Finger is too dry
-125 Finger is too moist

22
Aratek TrustFinger™ SDK

-126 Finger has few minutiaes


-130 Fake Finger
-131 Unknown Finger

-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:

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)

23
Aratek TrustFinger™ SDK

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
-102 SDK has not been initialized
-103 Device did not open

-104 Device not supported


-112 Failed to capture image
-113 Image capture timed out
-114 Device is busy
-119 Communication error
-120 Communication protocol not supported

-121 Invalid command


-122 Encode failure
-123 Decode failure
-124 Finger is too dry
-125 Finger is too moist
-126 Finger has few minutiaes

-130 Fake Finger


-131 Unknown Finger
-132 No Finger
-903 Invalid error
-904 Invalid firmware

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

-102 SDK has not been initialized


-103 Device did not open
-104 Device not supported

-112 Failed to capture image


-113 Image capture timed out
-114 Device is busy
-119 Communication error
-120 Communication protocol not supported
-121 Invalid command

-122 Encode failure


-123 Decode failure
-124 Finger is too dry
-125 Finger is too moist
-126 Finger has few minutiaes
-130 Fake Finger

-131 Unknown Finger


-132 No Finger
-903 Invalid error
-904 Invalid firmware

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

-103 Cannot open device


-127 LiveCapture is running

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

nHandle IN Device handler


pBmpData OUT RAW image data buffer.
Return code:
Return code Description
0 Get image successful
10 Failed to allocate memory

11 LiveCapture has ended


-100 Device is not present
-102 SDK has not been initialized
-103 Device did not open
-104 Device not supported

27
Aratek TrustFinger™ SDK

-112 Failed to capture image


-113 Image capture has timed out
-119 Communication error

-120 Communication protocol not supported


-121 Invalid command
-122 Encode failure
-123 Decode failure
-124 Finger is too dry
-125 Finger is too moist

-126 Finger has few minutiaes


-130 Fake Finger
-131 Unknown Finger
-132 No Finger
-903 Invalid error
-904 Invalid firmware

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

8BPP gray scale raw image data.


Return code:
Return code Description

0 Get image successful


10 Failed to allocate memory
11 LiveCapture has ended
-100 Device is not present
-102 SDK has not been initialized
-103 Device did not open

-104 Device not supported


-112 Failed to capture image
-113 Image capture timed out
-119 Communication error
-120 Communication protocol not supported
-121 Invalid command

-122 Encode failure


-123 Decode failure
-124 Finger is too dry
-125 Finger is too moist
-126 Finger has few minutiaes
-130 Fake Finger

-131 Unknown Finger


-132 No Finger
-903 Invalid error
-904 Invalid firmware

5.15ARAFPSCAN_EndLiveCapture
Prototype:

29
Aratek TrustFinger™ SDK

API DLL int __stdcall ARAFPSCAN_EndLiveCapture (HANDLE nHandle);


Description:
Stop live image capture.
Parameter:
Parameter Type Description

nHandle IN Device handler


Return code:
Return code Description
0 Get BMP image successful
-102 SDK did not initialize
-103 Cannot open device

-128 LiveCapture has not started

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

LED index, start from 0, please refer to device datasheet


nLedIndex IN
to get more detailed info.
*pStatus OUT LED status, 0 is OFF, 1 is ON
Return code:
Return code Description
0 Get LED status successful

30
Aratek TrustFinger™ SDK

-102 SDK did not initialize


-103 Device is not connected to host
-104 Device not supported

-106 Get Led Status fail


-114 Device is busy

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

nHandle IN Device handler


LED index, start from 0, please refer to device datasheet
nLedIndex IN
to get more detailed info.
nLedStatus IN LED status, 0 is OFF, 1 is ON
Return code:
Return code Description
0 Set LED status successful

-102 SDK did not initialize


-103 Device is not connected to host
-104 Device not supported
-106 Set Led Status fail
-114 Device is busy

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

nHandle IN Device handler


cFingerPos IN Finger position index
pFeatureData OUT ARATEK Bione® format feature
Return Code:
Return Code Description
0 Extract feature successful

10 Passing un-allocated memory


-102 SDK did not initialize
-103 Device not open
-114 Device is busy
-221 Failed to extract feature
-900 Invalid parameter

5.19ARAFPSCAN_ExtractANSIFeature
Prototype:
int __stdcall ARAFPSCAN_ExtractANSIFeature (HANDLE nHandle,
API DLL int cFingerPos,
unsigned char * pFeatureData)
Description:

32
Aratek TrustFinger™ SDK

Extract ANSI format feature from a RAW image.


Parameter:
Parameter Type Description
nHandle IN Device handler
cFingerPos IN Finger position index

pFeatureData OUT ANSI format feature


Return Code:
Return Code Description
0 Extract feature successful
10 Passing un-allocated memory
-102 SDK did not initialize

-103 Device not open


-221 Failed to extract feature
-900 Invalid parameter

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:

Parameter Type Description


nHandle IN Device handler
cFingerPos IN Finger position index
pFeatureData OUT ISO format feature
Return Code:

33
Aratek TrustFinger™ SDK

Return Code Description


0 Extract feature successful
10 Passing un-allocated memory

-102 SDK did not initialize


-103 Device not open
-114 Device is busy
-221 Failed to extract feature
-900 Invalid parameter

5.21ARAFPSCAN_GetISOFeatureLength
Prototype:

int __stdcall ARAFPSCAN_GetISOFeatureLength(unsigned char


API DLL
*pFeatureData,int &length)

Description:
Get length from ISO feature.

Parameter:
Parameter Type Description

pFeatureData IN ISO feature data

length OUT The length of feature

Return code:

Return code Description

0 Get length successful

-900 Invalid parameter

5.22ARAFPSCAN_GetANSIFeatureLength
Prototype:

API DLL int __stdcall ARAFPSCAN_GetANSIFeatureLength(unsigned char

34
Aratek TrustFinger™ SDK

*pFeatureData,int &length)

Description:
Get length from ANSI feature.

Parameter:
Parameter Type Description

pFeatureData IN ANSI feature data

length OUT The length of feature

Return code:

Return code Description

0 Get length successful

-900 Invalid parameter

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

pFeatureData2 IN Feature data


pFeatureData3 IN Feature data

35
Aratek TrustFinger™ SDK

pTemplateData OUT Output template


Return code:
Return code Description

0 Generate template successful


-102 SDK did not initialize
-103 Device is not opening
-114 Device is busy
-220 Fingerprint algorithm SDK is not initialized
-222 Failed to generate template

-900 Invalid parameter

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:

Parameter Type Description


nHandle IN Device handler

Security Level, has five levels:LOWEST,LOW,MEDIUM,

nSecurityLevel IN HIGH,HIGHEST,Higher, safer, recommend to use

MEDIUM
pFeatureData IN Fingerprint feature data
pTemplateData IN Fingerprint feature data
pnSimilarity OUT Output similarity about 2 features

presult OUT Output verify result about 2 feature


Return code:
Return code Description
0 Generate template successful
-102 SDK did not initialize
-103 Device is not opening

-114 Device is busy


-220 Fingerprint algorithm SDK is not initialized
-900 Invalid parameter

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

Convert RAW image to 8BPP gray scale BMP.


Parameter:
Parameter Type Description
pRawData IN Raw image data
Output BMP image, 1078 BMP header and RAW image
pBmpData OUT
data

nWidth IN Image Width


nHeight IN Image Height
Return code:
Return code Description
0 Convert successful
10 Passing un-allocated memory

-102 SDK did not initialize


-900 Invalid parameter

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

pBmpData IN BMP data buffer


pRawData OUT Output RAW image buffer
nWidth IN Image width

38
Aratek TrustFinger™ SDK

nHeight IN Image height


Return code:
Description Description

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

Compression ratio(value=11.25/multiple,the range of


Bitrate IN
multiple is 5-15)
pWSQData OUT Output WSQ format image data
lengthWSQ OUT Output the length of pWSQData
Return code:
Description Description
0 Convert successful

39
Aratek TrustFinger™ SDK

10 Passing un-allocated memory


-102 SDK did not initialize
-201 No WSQ Library

-202 WSQ compress error


-900 Invalid parameter

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

width IN Image width


height IN Image height
ipImage IN Raw image date
Quality OUT Image quality, 0 to 100
Return code:
Return code Description

0 Get image quality score successful


-211 Image is too bad
-900 Invalid parameter

5.29ARAFPSCAN_GetNFIQScore
Prototype:
API DLL int __stdcall ARAFPSCAN_GetNFIQScore(int width, int height,

40
Aratek TrustFinger™ SDK

unsigned char *ipImage, unsigned char *Quality)


Description:
Get NFIQ standard image quality level. The level will be assigned a value ranging
from 1 to 5, with 1 having the highest image quality and 5 having the lowest.
Parameter:
Parameter Type Description

width IN Image width


height IN Image height
ipImage IN Raw image date
Quality OUT Image quality level, 1 to 5
Return code:
Return code Description

0 Get image quality score successful


-203 No NFIQ Library
-211 Image is too bad
-900 Invalid parameter

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

nHandle IN Device handler

pEnable IN LFD Status, TRUE is on, FALSE is off

41
Aratek TrustFinger™ SDK

LFD_Level IN LFD Level, 1 to 5

Return code:
Return code Description

0 Set LFD Status successful


-102 SDK is not initialized
-103 Device is not open
-129 Set LFD status fail
-900 Invalid parameter

5.31ARAFPSCAN_GetErrorInfo
Prototype:

int __stdcall ARAFPSCAN_GetErrorInfo(int nErrorNo, char


API DLL
pszErrorInfo[256])
Description:
Get error code info.
Parameter:
Parameter Type Description
nErrorNo IN Error code
pszErrorInfo OUT Error info
Return code:

Return code Description


0 Get error code detail info successful

6 Appendix A: Error Codes

Error Code Description


0 Command successful (no error returned)

10 Passing un-allocated memory


11 LiveCapture has ended
42
Aratek TrustFinger™ SDK

-100 Device is not present


-102 SDK is not initialized
-103 Device is not open

-104 Not supported device


-106 Get/Set Led Status fail
-110 Failed to upload image, reader is capturing image
-111 Not begin image command to inform reader to capture image
-112 Failed to get image
-113 Capture image timeout

-114 Device is busy


-115 SDK has already been initialized
-117 Device has already been opened
-118 Failed to get device info
-119 Communication failure
-120 Communication protocol not supported

-121 Invalid command


-122 Encode failure
-123 Decode failure
-124 Finger image is too dry
-125 Finger image is too moist
-126 Few minutiae

-127 LiveCapture is running


-128 LiveCapture has not started
-129 Set LFD status fail
-130 Fake Finger
-131 Unknown Finger
-132 No Finger

-200 Failed to initialize fingerprint algorithm SDK

43
Aratek TrustFinger™ SDK

-201 No WSQ Library


-202 WSQ compress error
-203 No NFIQ Library

-210 No valid image in image frame buffer


-211 Image quality is poor
-212 Invalid BMP
-220 Did not initialize fingerprint algorithm SDK
-221 Failed to extract feature
-222 Failed to combine template

-900 Invalid parameter


-901 Memory is not enough
-902 Function not yet implemented
-903 Invalid error
-904 Invalid Firmware

7 Appendix B: Supported Devices

Picture Module Description

A400 Capacitive fingerprint reader

A600 Optical fingerprint reader

FRT610 Capacitive fingerprint reader

EM03-3011 Capacitive fingerprint reader module

EM-4010 Capacitive fingerprint reader module

44
Aratek TrustFinger™ SDK

EM4010 Capacitive fingerprint reader module

45
Aratek TrustFinger™ SDK

46

You might also like