Essentials API - v1.1 - EN
Essentials API - v1.1 - EN
This document contains commercial information and trade secrets, which are confidential and the proprietary in nature and are subject to
protection under China and/or international law. Access to the information contained herein, howsoever acquired and of whatsoever nature,
will not entitle the accessor thereof to acquire any right thereto. The data subject to this restriction are contained in all sheets in this
document.
This BioSlap fingerprint scanner contains commercial or trade secrets of Shenzhen Bio Technologies Co.,Ltd. Disclosure of any such information
or trade secrets shall not be made without the prior written permission of Shenzhen Bio Technologies Co.,Ltd.
No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise, without the prior written permission of Shenzhen Bio Technologies Co.,Ltd.
The information in this document is subject to change without notice. The software mentioned in this document is furnished under license and
may only be used or copied in accordance with the terms of such license. Contact vendors directly for terms of software licenses for any
software mentioned in this document if applied, not originating from Shenzhen Bio Technologies Co.,Ltd.
All brand or product names are the trademarks or registered trademarks of their respective holders.
Essential API – BioSlap
i
Essential API – BioSlap
ii
Essential API – BioSlap
iii
Essential API – BioSlap
1.1 PC CPU
• Intel Core i3, 2.0GHZ or better
1
Essential API – BioSlap
2 SDK Usage
2.1 Overview
This Essentials API provides access to the BioSlap ten print scanner. It is designed to be usable in a multi- threaded
environment. The interface is provided as a DLL that exports C functions.
If you plan to load the DLL statically, then the following files needs to be specified for linkage:
• BioIDFScanner.lib
At runtime, the following files need to be accessible:
• BioIDFScanner.dll – the main runtime library.
• BioIDFinger.dll, DTF.dll, etc… – mosaic arithmetic runtime library.
2. Call M_Capture_RegisterCallbackPreviewImage()
Call M_Capture_RegisterCallbackTakingResultImage()
Call M_Capture_RegisterCallbackResultImage()
2
Essential API – BioSlap
Applications utilize a BioSlap scanner by using the API in the following manner:
int nRc;
m_iCurIndex = 0;
SetInfo("Initialization device!",0);
nRc = M_Main_Initialize(m_iCurIndex,&m_DeviceHandle[m_iCurIndex]);
if (nRc != STATUS_OK) return;
m_iCurHandle = m_DeviceHandle[m_iCurIndex];
M_Capture_RegisterCallbackPreviewImage(
m_iCurHandle,
OnPreviewImageAvailable,
this
);
M_Capture_RegisterCallbackTakingResultImage(
m_iCurHandle,
OnTakingResultImage,
this
);
M_Capture_RegisterCallbackResultImage(
3
Essential API – BioSlap
m_iCurHandle,
OnResultImageAvailable,
this
);
Starting an Acquisition
Please call M_Capture_SetMode to set capture image mode and call M_Capture_Start to Getting the
The images and data received with the CallbackResultImage function reflects the final document images and data as it is
captured.
Important: The BioSlap scanner owns the image’s memory buffer. Do not keep pointers to this
buffer because address of the buffer may change next image acquisitions.
NOTE: If an application closes without closing any open BioSlap scanner then the device driver interface
will automatically close all the running BioSlap scanner. This happens before the DLL is unloaded.
This behavior holds true if the application loaded and unloaded the BioSlap scanner DLL
dynamically.
if (…) delete[] …;
if (…) delete[] …;
if (…) delete[] …;
4
Essential API – BioSlap
int nRet = 0;
DTFPropertyInfo info;
…
nRet = M_Main_GetDeviceInfo(ihandle,&info);
5
Essential API – BioSlap
4 Function Reference
• M_Main_Initialize
• M_Main_DeInitialize
• M_Capture_SetMode
• M_Capture_Start
• M_Capture_TakeResultImage
• M_Capture_AcquireResultImage
• M_Controls_Beeper
• M_Capture_SetRollParameters
• M_Capture_Caliebration
• M_Control_RemoveFog
• M_Capture_FPSegment
• M_Main_GetDeviceInfo
• M_Capture_Raw2Wsq
• M_Capture_GetTemplate
• M_Capture_RegisterCallbackPreviewImage
• M_Capture_RegisterCallbackResultTakingImage
• M_Capture_RegisterCallbackReusultImage
• M_Capture_IsTrueFinger
6
Essential API – BioSlap
4.1 M_Main_Initialize
Initialize the device.
Parameters
• handle [out] Function returns device handle to be used for subsequent function calls
Return Value
4.2 M_Main_DeInitialize
DeInitialize the device.
Return Value
4.3 M_Capture_SetMode
Set capture mode
7
Essential API – BioSlap
Parameters
Return Value
4.4 M_Capture_Start
Start image acquisition
Return Value
4.5 M_Capture_TakeResultImage
Initiate manual result image acquisition, This function needs to be called prior to M_Capture_AcquireResultImage().
8
Essential API – BioSlap
4.6 M_Capture_AcquireResultImage
Acquire the result image, it might take several seconds, expect a delay
Return Value
4.7 M_Contorls_Beeper
Send beep pattern to internal device beeper.
Return Value
4.8 M_Capture_SetRollParameters
Set roll parameters
Return Value
9
Essential API – BioSlap
4.9 M_Capture_Calibration
Calibrate scanner
Parameters
Return Value
4.10 M_Control_RemoveFog
Setting a flag of remove fog from image
Return Value
4.11 M_Capture_FPSegment
Segment flat image
10
Essential API – BioSlap
Parameters
Return Value
4.12 M_Main_GetDeviceInfo
Retrieve detailed device information
4.13 M_Capture_Raw2Wsq
Save the image as WSQ format.
11
Essential API – BioSlap
Parameters
Return Value
4.14 M_Capture_GetTemplate
Extract fingerprint feature data.
int WINAPI M_Capture_Raw2Wsq(
const int handle,
unsigned char* Image,
int ImgWidth,
int ImgHeight,
int FingerPosition,
Int TemplateType,
Unsigned char** Template,
Int* TemplateSize
);
Parameters
12
Essential API – BioSlap
Return Value
4.15 M_Capture_RegisterCallbackPreviewImage
Callback preview image availability
⚫ context [in] Pointer to user context; this value is used as parameter for callback
Return Value
4.16 M_Capture_RegisterCallbackTakingResultImage
Callback for start of result image capture
⚫ context [in] Pointer to user context; this value is used as parameter for callback
Return Value
13
Essential API – BioSlap
4.17 M_Capture_RegisterCallbackResultImage
Callback for completion of result image acquisition
⚫ context [in] Pointer to user context; this value is used as parameter for callback
Return Value
If the function succeeds, the return value is 0, else <0.
4.18 M_Capture_IsTrueFinger
To check if a live finger presented or fake finger detection
int WINAPI M_Capture_IsTrueFinger(
const int handle,
unsigned char* Image,
int ImgWidth,
int ImgHeight,
);
Parameters
Return Value
If the function succeeds, the return value is 1, else <0.
• CallbackPreviewImage
14
Essential API – BioSlap
• CallbackTakingResultImage
• CallbackResultIImage
5.1 CallbackPreviewImage
Preview image available notification.
Parameters
• pContext [in] caller defined context (e.g. handler object instance pointer)
5.2 CallbackTakingResultImage
This notification is sent to indicate begin of result image acquisition.
typedef void ( CALLBACK *CallbackTakingResultImage ) (
void* pContext
);
Parameters
• pContext [in] caller defined context (e.g. handler object instance pointer)
5.3 CallbackResultImage
Result image acquisition completion notification.(only valid if imageStatus >= STATUS_OK)
Parameters
• pContext [in] caller defined context (e.g. handler object instance pointer)
• imageStatus [in] result image status value (value >= STATUS_OK indicates success)
15
Essential API – BioSlap
6 Structs Reference
• ImageData
• DTFPropertyInfo
• DTFRunningInfo
• DTFImageResolution
• DTFImageType
• SegFPData
• DFRollParameters
6.1 ImageData
Container to hold image data together with meta information
Member Data
• void* Buffer
• DWORD Width
• DWORD Height
• double ResolutionX
• double ResolutionY
• double FrameTime
• int Pitch
• BYTE BitsPerPixel
• ImageFormat Forma
• BOOL IsFinal
6.2 DTFPropertyInfo
Device information
16
Essential API – BioSlap
Member Data
• int nResolution
• char szMaker[MAX_STR_LEN]
• char szModel[MAX_STR_LEN]
• char szInterfaceType[MAX_STR_LEN]
• char szSerial[MAX_STR_LEN]
• char szVer[MAX_STR_LEN]
• char szManDate[MAX_STR_LEN]
• char szServDate[MAX_STR_LEN]
17
Essential API – BioSlap
6.3 DTFRunningInfo
Device running information
Member Data
• BOOL bIsInitialized
• BOOL bIsCaptueing;
• BOOL bIsCaptureAbort;
• BOOL bAutoCapture;
• BOOL bAutoContrast;
• BOOL bStartPreview;
• BOOL bIsCaptureOK;
• BOOL bIsStartRolling;
• int nErrorCode;
6.4 ImageResolution
Image resolution types
• IMAGE_RESOLUTION_500 = 500
• IMAGE_RESOLUTION_1000 = 1000
6.5 DTFImageType
Image types
18
Essential API – BioSlap
19
Essential API – BioSlap
• FLAT_TWO_THUMBS_R_IndexMiddle,
• FLAT_TWO_THUMBS_R_RingSmall,
• FLAT_TWO_THUMBS_L_IndexMiddle,
• FLAT_TWO_THUMBS_L_RingSmall,
• FLAT_ALL_FINGERS,
6.6 SegFPData
Single fingerprint data
• int nFGP
• int nWidth
• int nHeight
• int nQuality
• int nRawImgLe
6.7 DFRollParameters
Roll construct parameter
• int MaxFrameNumber
• int SlideDetectionStatus
• float SlidingPercentageThreshold
• int SlidingSADMeanThreshlod
• int RollBackThreshold
• int CheckSensorThreshold
20