Armatura SDK Guide - MultiBio 2.1 - Windows-202206
Armatura SDK Guide - MultiBio 2.1 - Windows-202206
June 2022
Thank you for choosing our product. Please read the instructions carefully
before operation. Follow these instructions to ensure that the product is
functioning properly. The images shown in this manual are for illustrative
purposes only.
Trademark
Disclaimer
This manual contains information on the operation and maintenance of the ARMATURA product. The
copyright in all the documents, drawings, etc. in relation to the ARMATURA supplied product vests in
and is the property of ARMATURA. The contents hereof should not be used or shared by the receiver
with any third party without express written permission of ARMATURA.
The contents of this manual must be read as a whole before starting the operation and maintenance
of the supplied product. If any of the content(s) of the manual seems unclear or incomplete, please
contact ARMATURA before starting the operation and maintenance of the said product.
It is an essential pre-requisite for the satisfactory operation and maintenance that the operating and
maintenance personnel are fully familiar with the design and that the said personnel have received
thorough training in operating and maintaining the machine/unit/product. It is further essential for the
safe operation of the machine/unit/product that personnel have read, understood, and followed the
safety instructions contained in the manual.
In case of any conflict between terms and conditions of this manual and the contract specifications,
drawings, instruction sheets or any other contract-related documents, the contract
conditions/documents shall prevail. The contract specific conditions/documents shall apply in priority.
ARMATURA does not assume responsibility for any errors or omissions in the information or
documents which are referenced by or linked to this manual. The entire risk as to the results and
performance obtained from using the information is assumed by the user.
ARMATURA in no event shall be liable to the user or any third party for any incidental, consequential,
indirect, special, or exemplary damages, including, without limitation, loss of business, loss of profits,
business interruption, loss of business information or any pecuniary loss, arising out of, in connection
with, or relating to the use of the information contained in or referenced by this manual, even if
ARMATURA has been advised of the possibility of such damages.
This manual and the information contained therein may include technical, other inaccuracies, or
typographical errors. ARMATURA periodically changes the information herein which will be
incorporated into new additions/amendments to the manual. ARMATURA reserves the right to add,
delete, amend, or modify the information contained in the manual from time to time in the form of
circulars, letters, notes, etc. for better operation and safety of the machine/unit/product. The said
additions or amendments are meant for improvement /better operations of the machine/unit/product
and such amendments shall not give any right to claim any compensation or damages under any
circumstances.
ARMATURA shall in no way be responsible (i) in case the machine/unit/product malfunctions due to
any non-compliance of the instructions contained in this manual (ii) in case of operation of the
machine/unit/product beyond the rate limits (iii) in case of operation of the machine and product in
conditions different from the prescribed conditions of the manual. The product will be updated from
time to time without prior notice. The latest operation procedures and relevant documents are
available on http://www.armatura.us.
ARMATURA Headquarters
Address 190 Bluegrass Valley Pkwy,
Alpharetta, GA 30005, USA.
ARMATURA biometric hardware and software are incorporated into the product designs of some of
the world’s leading suppliers of workforce management (WFM) terminals, Point-of-Sale (PoS)
terminals, intercoms, electronic safes, metal key lockers, dangerous machinery, and many other
products which heavily rely on correctly verifying & authenticating user’s identity.
All figures displayed are for illustration purposes only. Figures in this manual may not be exactly
consistent with the actual products.
Document Conventions
Conventions used in this manual are listed below:
GUI Conventions
For Software
Convention Description
Bold font Used to identify software interface names e.g., OK, Confirm, Cancel
Multi-level menus are separated by these brackets. For example, File > Create >
>
Folder.
For Device
Convention Description
<> Button or key names for devices. For example, press <OK>
Window names, menu items, data table, and field names are inside square
[]
brackets. For example, pop up the [New User] window
Symbols
Convention Description
This implies about the notice or pays attention to, in the manual
Table of Contents
1 INTRODUCTION .......................................................................................................................... 7
1 Introduction
This document will provide the basic development guide and technical background to help with the
better implementation of AMTMultiBio SDK for Android. From the perspective of a developer, the key
design objective of this SDK is its compatibility and ease of execution.
This development manual contains the product development documentation for developers that
describes the functions provided by the SDK and its related usage which eases the development
environment. The following sections will explain all the required information on how to perform and
integrate the AMTMultiBio SDK.
The SDK not only encapsulates the module-built-in face and palm recognition algorithm functions,
also provides the low computing power, high-performance on-host face/palm matching methods. This
provides the flexibility to the application integration and simplify the solution by managing and
matching templates directly in the application.
AMTMultiBio SDK supports common operating system including Windows, Android, and Linux (on
request), empowers the biometric features on wide range of hardware/software applications,
especially the low computing powered embedded hardware applications.
For deep learning technologies, heavy computing power is required to extract biometric
features and generate face/palm templates. With MultiBio SDK, the template generation task
is shifted to Armatura multimodal modules, which greatly lowers the hardware platform
requirements and entitles low computing powered devices (i.e. MCU-based) to biometric
technologies.
While on special cases where the host computing power is weak or has limited storage space,
Match on Module provides the suitable solution without modifying the hardware.
2 Technical Specifications
This SDK provides a standard Win32 APIs that support C, C++, C# language development. It can
work on both 32-bit and 64-bit operating system of Windows XP SP3 or higher.
The Match-on-Host mode can transmit images and video data of face and palm through UVC at high
speed. Also, it can use the advantages of the high-performance host, which quickly realizes face and
palm recognition.
The Match-on-Module mode utilizes the performance and capacity of the module to achieve stable
and effective data interaction through the HID protocol. And this reduces the burden on the Host side
with low performance, small capacity and not supporting the UVC protocol.
The flexible use of different modes enables rapid comparison of large-capacity faces and palms and
rapid application development.
Process Description
• AMTCameraLib acquires UVC video streams and custom data (including biometric
information such as faces, palms, etc.).
Process Description
• AMTCameraLib acquires UVC video streams and custom data including, biometric
information and recognition information such as faces, palms and more.
• AMTHIDLib loads and sets parameters, upgrades, manage data and more.
• The Match-on-Module Mode cannot only transmit face and palm data through UVC
but also obtains the data of face and palm through Polling Recognition Result.
• The host side does not need to use AMTPalmMatch and AMTFaceMatch for
comparison processing and can directly obtain match information through UVC or
Polling Recognition Result.
• The user collects the images through [AMTCameraLib] or other UVC implementation
methods.
• These captured images could be used for display, face recognition, palm recognition
and other purposes.
• The module now supports two resolutions of 480 x 640 and 720 x 1280 and an output
configuration of up to 30FPS.
• The image transmission adopts the standard UVC protocol, transmits the visible light
image and the near-infrared image through their UVC ports, where the developers can
select the required port settings according to the image requirements.
• Host side can complete the subsequent template matching through [AMTFaceMatch]
and [AMTPalmMatch].
• The following images describe the Match-on-Host and user management design.
• After the matching process completed for the client application to call, it produces the
recognition result through the Polling Recognition Result.
• This method can minimize the computing resource consumption of the client application
platform processor and is particularly suitable for integrating face or palm recognition
functions on low-performance embedded platforms.
DLL Contents
SDK dynamic link library files can be copied and installed directly.
Before installing the AMTMultiBio SDK, please make sure that your operating system, computer
configuration, or Windows mobile terminal device meets the operational requirements of the
software.
And by referring to [Match-on-Module Process], users can easily understand the process of
internal staff management and Match-on-Module of the module.
Process Description
• The returned face information contains the angle of the face (recommended yaw<=25,
pitch<=25, roll<=25), size (recommended faceWidth>=128, faceHeight>=128), and
quality (recommended >=0.8). This information determines if the registered face is
efficient and qualified.
Process Description
• The AMTPalmMatch_DBIdentify function gets the verification template and checks for
duplication.
• Then, the AMTHID_MergePalm interface is called to merge the collected five templates
as a registration template.
• And the required personnel information will acquire through UVC or [Polling Recognition
Result].
Note: If the developer uses the polling recognition result, then it is necessary to suspend HID
polling when using the HID command to obtain other data or else it will affect the acquisition of
the data.
Process Description
• To use the internal matching mode, you need to add personnel information on the Host
side first.
• Face and palm registration can upload photos through the host side or register directly
through the [Cache Registration] mode.
When using the internal matching mode, the registered face will get authenticated via the internal
CacheId in cache registration mode. Refer to the following process.
Process Description
• When registering a face using the cache registration mode, first enter the [Cache
Registration] mode, and then get the CacheId.
• After the face registration is completed, it is necessary to exit the [Cache Registration]
mode or else the face and palm cannot be compared.
When using the internal matching mode, the registered palm will get authenticated via the internal
CacheId in cache registration mode. Refer to the following process.
Process Description
• When registering a palm using the cache registration mode, first enter the [Cache
Registration] mode, and then get the CacheId.
• After the palm registration is complete, it is necessary to exit the [Cache Registration]
mode or else the face and palm cannot be compared.
Function List
Interface Description
VideoData
Function Syntax
{
uint32_t frame_index;
uint32_t ori_length;
uint32_t data_length;
unsigned char* data;
};
Parameters
Parameter Description
uint32_t ori_length It is the original data length (jpeg data integrity verification)
Remarks
CustomData
Function Syntax
{
int64_t frame_index;
int32_t width;
int32_t height;
char *customData;
};
Parameters
Parameter Description
Remarks
• For custom JSON format data with information about face tracking, face attributes, liveness,
face templates, palm detection, palm templates, and so on, refer to Face Tracking and
Recognition and Palm Recognition.
• Click here to view the Function List.
VideoDataCallback
Function Syntax
Parameters
Parameter Description
Out: User custom data passed in when calling AMTCamera_SetDataCallback
pUserParam
function.
data Out: Video data structure
Remarks
CustomDataCallback
Function Syntax
Parameters
Parameter Description
Out: User custom data passed in when calling AMTCamera_SetDataCallback
pUserParam
function
data Out: Custom data structure
Remarks
AMTCamera_Init
Function Syntax
Description
Returns
0 Success
Other Failure
Remarks
AMTCamera_Terminate
Function Syntax
Description
Returns
0 Success
Other Failure
Remarks
AMTCamera_GetDeviceCount
Function Syntax
Description
Returns
Other Failure
Remarks
AMTCamera_GetDeviceType
Function Syntax
Description
Parameters
Parameter Description
Returns
2 NIR camera
<0 Failed
Remarks
AMTCamera_OpenDevice
Function Syntax
Parameters
Parameter Description
Returns
0 Success
Other Failure
Remarks
AMTCamera_CloseDevice
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Other Failure
Remarks
AMTCamera_GetCapWidth
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTCamera_GetCapHeight
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTCamera_SetDataCallback
Function Syntax
Description
Parameters
Parameter Description
Remarks
AMTCamera_FreePointer
Function Syntax
Description
Parameters
Parameter Description
Function List
Interface Description
SendFileCallback
Function Syntax
Description
Parameters
Parameter Description
Out: User custom data passed in when calling AMTHID_SendFile
pUserParam
function
progress Out: Sends the file progress, and its range is 0-100
Remarks
AMTHID_Init
Function Syntax
Description
Returns
0 Success
Remarks
AMTHID_Terminate
Function Syntax
Description
Returns
0 Success
Remarks
AMTHID_GetCount
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Remarks
AMTHID_Open
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Remarks
AMTHID_Close
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Remarks
AMTHID_GetConfig
Function Syntax
int *len
)
Description
Parameters
Parameter Description
1 COMMON_ CONFIG
CAPTURE_FILTER_
2
CONFIG
type 3 MOTION_DETECT_CONFIG
4 PALM_ CONFIG
5 DEVICE_INFORMATION
6 DEVICE_TIME
Returns
0 Success
Remarks
• For JSON data, please refer to [Get and set configuration parameters].
• Click here to view the Function List.
AMTHID_SetConfig
Function Syntax
int type,
char *json
)
Description
Parameters
Parameter Description
1 COMMON_ CONFIG
2 CAPTURE_FILTER_
type CONFIG
3 MOTION_DETECT_CONFIG
4 PALM_ CONFIG
6 DEVICE_TIME
Returns
0 Success
Remarks
• For JSON data, please refer to [Get and set configuration parameters].
• Click here to view the Function List.
AMTHID_RegisterFace
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Remarks
• For JSON data, please refer to Host side face registration process and [Face service-
related functions].
• Click here to view the Function List.
AMTHID_RegisterPalm
Function Syntax
Parameters
Parameter Description
handle In: Handle of the device
json In: JSON string
Out: Returns the palm pre-registration and verification/identification
palmData template in JSON data format, and the recommended allocation is
200*1024 bytes.
In: Length of the palmData
len
Out: Returns the actual length of the palmData
Returns
0 Success
Remarks
• For JSON data, please refer to Host side palm registration process and Palm service-related
functions.
• Click here to view the Function List.
AMTHID_MergePalm
Function Syntax
Parameters
Parameter Description
Returns
0 Success
Remarks
AMTHID_SnapShot
Function Syntax
Captures an image.
Parameters
Parameter Description
snapType In: Snapshot type, snapshot RGB camera or NIR camera image
Out: Returns the captured JSON data, and the recommended
snapData
allocation is 2*1024*1024 bytes
In: Size of the allocated snapData
size
Out: Returns the actual length of the data.
Returns
0 Success
Remarks
AMTHID_SendFile
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Remarks
• When sending large files such as images, it is recommended that the application should be
implemented in a thread.
• Click here to view the Function List.
AMTHID_Reboot
Function Syntax
Parameters
Parameter Description
Returns
0 Success
Remarks
• When sending the large files such as images, it is recommended that the application should
be implemented in a thread.
AMTHID_ManageModuleData
Function Syntax
Description
Manages module internal data, including user management, biometric templates, matching records, etc.
Parameters
Parameter Description
1 ADD_PERSON
2 DEL_PERSON
3 CLEAR
4 GET_PERSON
5 QUERY_ALL_PERSON
6 QUERY_STATISTICS
type 7 ADD_FACE
8 ADD_FACE_REG
9 DETECT_FACE_REG
10 REG_START
11 REG_END
12 DETECT_PALM_REG
13 ADD_PALM
14 ADD_PALM_REG
15 MERGE_PALM_REG
16 DEL_FACE_CACHE_ID
17 DEL_PALM_CACHE_ID
18 ATT_RECORD_COUNT
19 EXPORT_ATT_RECORD
20 CLEAR_ATT_RECORD
In: JSON data is passed in when managing the users inside the
json
module
result Out: Returns the JSON data
Returns
0 Success
Remarks
AMTHID_PollMatchResult
Function Syntax
Description
Parameters
Parameter Description
Returns
0 Success
Other Failure (see Appendix 1)
Remarks
3.3 AMTFaceMatch
AMTFaceMatch.dll is a dynamic link library of face algorithm API, which implements 1:1 and 1:N
verification/identification functions.
Function List
Interface Description
AMTFaceMatch_DBCount Gets the total count of the templates stored in the database
Verifies the captured template with the template of that
AMTFaceMatch_DBVerify specified ID stored in the database and returns the verification
value.
AMTFaceMatch_GetVersion
Function Syntax
Description
Parameters
Parameter Description
Out: Returns the Face algorithm version number.
version
Recommended space allocation is 64 bytes.
In: The amount of version space allocated.
size
Out: Returns the actual version size.
Returns
Remarks
AMTFaceMatch_Init
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTFaceMatch_Terminate
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTFaceMatch_Verify
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTFaceMatch_DBAdd
Function Syntax
Description
Parameters
Parameter Description
id In: Face ID
Returns
Remarks
AMTFaceMatch_DBDel
Function Syntax
Description
Parameters
Parameter Description
context In: Face algorithm handle
id In: Face ID
Returns
Remarks
AMTFaceMatch_DBClear
Function Syntax
Description
Parameters
Parameter Description
context In: Face algorithm handle
Returns
Remarks
AMTFaceMatch_DBCount
Function Syntax
Description
Gets the total count of the face template stored in the database.
Parameters
Parameter Description
Returns
Remarks
AMTFaceMatch_DBVerify
Function Syntax
Description
Verifies the captured template with the template of that specified ID stored in the database.
Parameters
Parameter Description
id In: Face ID
Returns
Remarks
AMTFaceMatch_DBIdentify
Function Syntax
Description
Identifies the captured template against all the stored templates in the database.
Parameters
Parameter Description
Returns
Remarks
3.4 AMTPalmMatch
AMTPalmMatch.dll is a palm algorithm API dynamic link library, which implements 1:1 and 1:N
verification/identification functions.
Function List
Interface Description
AMTPalmMatch_GetVersion
Function Syntax
)
Description
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_Init
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_Terminate
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_Verify
Function Syntax
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_DBAdd
Function Syntax
Parameters
Parameter Description
id In: Palm ID
Returns
Remarks
AMTPalmMatch_DBDel
Function Syntax
Description
Parameters
Parameter Description
id In: Palm ID
Returns
Remarks
AMTPalmMatch_DBClear
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_DBCount
Function Syntax
Description
Parameters
Parameter Description
Returns
Remarks
AMTPalmMatch_DBVerify
Function Syntax
Description
Verifies the captured template with the template of that specified ID stored in the database and returns
the verification value.
Parameters
Parameter Description
id In: Palm ID
Returns
Remarks
AMTPalmMatch_DBIdentify
Function Syntax
Description
Identifies the captured template against all the stored templates in the database and returns the
identification value.
Parameters
Parameter Description
Returns
Remarks
4 Data Communication
The data exchange between the module and the host side supports both UVC and HID methods.
UVC is mainly responsible for Big data transmission such as image transmission, and HID is
responsible for sending commands and receiving small data such as configuration.
4.1.1 Image
Image data is mainly used for registration and returns the registered photos when using the
images of faces and palms.
Function Syntax
{
"image": {
"bioType": "face",
"data": "/9j/4AAQSkZJRgABA",
"format": "jpeg",
"width": 720,
"height": 1280
}
Parameter Description
4.1.2 CacheId
CacheId is mainly used for [Cache Registration], the registration method can refer to [Face Cache
Registration] and [Palm Cache Registration].
Function Syntax
{
"cacheId": {
"bioType": "face",
"data": 1
}
Parameter Description
Is it
Parameter Description
Required
The type of image information returned.
bioType Yes • Face: "face"
• Palm: "palm"
The data ID stored inside the module, can be used to add faces,
data Yes
palms, etc.
4.1.3 Feature
Biometric template data can be used for face and palm recognition and registration.
Function Syntax
{
"feature": {
"bioType": "face",
"data": "xxxx",
"size": 1024
}
}
Parameter Description
4.1.4 Attribute
The face attribute data used to provide custom functions, such as prompting different voices
according to gender and age.
Function Syntax
{
"attribute": {
"age": 29,
"beauty": -1,
"cap": 0,
"expression": 0,
"eye": -1,
"gender": 1,
"glasses": -1,
"mouth": -1,
"mustache": 1,
"respirator": 0,
"skinColor": 0,
"smile": -1
}
}
Parameter Description
Parameter Is it Required Description
0 calm
1 happy
2 angry
expression Yes 3 sorrow
4 surprise
5 scared
6 disgust
7 yawn
0 None
1 Full cover
2 Mouth not covered
3 Nose not covered
Skin color
0 Yellow
1 White
skinColor Yes
2 Black
3 Brown
4 Unknown
Smile
0 Calm
1 Happy
2 Angry
smile Yes
3 Sorrow
4 Surprise
5 Scared
6 Disgust, yawn
4.1.5 Identify
Identify is the recognition result returned by UVC or [Polling Recognition Result] during internal
comparison.
Function Syntax
{
"identify": [{
"groupId": "",
"name": "1180665",
"personId": "1180665",
"similarity": 0.9328765869140625,
"userId": "1180665"
}]
}
Parameter Description
4.1.6 Liveness
The face liveness data is used to determine whether it is a photo or video attack.
Function Syntax
{
"liveness": {
"irFrameId": 10339,
"liveness": 2,
"livenessMode": 12,
"livenessScore": 0.91753107309341431,
"quality": 0.90849864482879639
}
}
Parameter Description
Liveness mode,
4.1.7 Landmark
The key point coordinates of the face in Landmark, and its data type is float.
Function Syntax
{
"landmark": {
"count": 106,
"data": "xxxx"
}
}
Parameter Description
4.1.8 Tracker
Tracker is the face information returned by face tracking in real time, including [Landmark], [Pose],
and [Rect] information.
Function Syntax
{
"tracker": {
"blur": 0.0030255913734436035,
"landmark": {
"count": 106,
"data": "xxxx"
},
"pose": {
"pitch": -4.165733814239502,
"roll": 0.42814359068870544,
"yaw": -9.6133241653442383
},
"rect": {
"bottom": 730,
"left": 529,
"right": 712,
"top": 477
},
"snapType": "",
"trackId": 40
}
}
Parameter Description
1. Pose
Function Syntax
{
"pose": {
"pitch": -4.165733814239502,
"roll": 0.42814359068870544,
"yaw": -9.6133241653442383
}
}
Parameter Description
2. Rect
Function Syntax
{
"rect": {
"bottom": 730,
"left": 529,
"right": 712,
"top": 477
}
}
Parameter Description
4.1.9 FaceInfo
The JSON data for FaceInfo is as follows;
Function Syntax
{
"faceInfo": {
"attribute": {
"age": 30,
"beauty": -1,
"cap": 0,
"expression": 0,
"eye": -1,
"gender": 0,
"glasses": -1,
"mouth": -1,
"mustache": 1,
"nation": -1,
"respirator": 0,
"skinColor": 0,
"smile": -1
},
"pose": {
"pitch": 3.5096845626831055,
"roll": -2.404015064239502,
"yaw": -13.170290946960449
},
"rect": {
"bottom": 888,
"left": 167,
"right": 507,
"top": 562
},
"landmark": {
"count": 106,
"data": "xxxx"
},
"score": 0.808082
}
}
Parameter Description
4.1.10 PalmInfo
The JSON data for PalmInfo is as follows:
Function Syntax
{
"palmInfo": {
"rect": {
"x0": 156,
"y0": 222,
"x1": 356,
"y1": 222,
"x2": 888,
"y2": 167,
"x3": 507,
"y3": 562
},
"imageQuality": 90,
"templateQuality": 40
}
}
Parameter Description
4.1.11 PalmFeature
The JSON data of the palm template is as follows:
Function Syntax
"feature": {
"verTemplate":
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"verTemplateSize": 26448,
"preTemplate":
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"preTemplateSize": 98448
Parameter Description
Function Syntax
{
"image": {
"bioType":"face",
"data":"/9j/4AAQSkZJRgABA…",
"format":"jpeg",
"width":720,
"height":1280
},
"feature" : "true",
"faceInfo" : "true",
"picture" : "true"
}
Parameter Description
Function Syntax
{
"data": {
"faces": [{
"faceInfo": {
"attribute": {
"age": 36,
"beauty": -1,
"cap": 0,
"expression": 0,
"eye": 0,
"gender": 1,
"glasses": -1,
"mouth": -1,
"mustache": 1,
"nation": -1,
"respirator": 0,
"respiratorLevel": 0,
"skinColor": 0,
"smile": -1
},
"landmark": {
"count": 106,
"data": "xxxxxx"
},
"pose": {
"pitch": -1.715240478515625,
"roll": -2.3650076389312744,
"yaw": -0.57134813070297241
},
"rect": {
"bottom": 660,
"left": 220,
"right": 504,
"top": 360
},
"score": 0.99672424793243408
},
"feature": {
"bioType": "face",
"data": "xxxx",
"size": 1024
}
}]
},
"detail": "success",
"status": 0
}
Parameter Description
Function Syntax
{
"face": [{
"attribute": {
"age": 25,
"beauty": -1,
"cap": 0,
"expression": 0,
"eye": -1,
"gender": 1,
"glasses": -1,
"mouth": -1,
"mustache": 1,
"nation": -1,
"respirator": 0,
"skinColor": 0,
"smile": -1
},
"feature": {
"data": "xxxxxx",
"size": 1024
},
"identify": [{
"groupId": "",
"name": "magic",
"personId": "1180665",
"similarity": 0.965038001537323,
"userId": "1180665"
}],
"liveness": {
"irFrameId": 215729,
"liveness": 2,
"livenessMode": 12,
"livenessScore": 0.69999980926513672,
"quality": 0.50933307409286499
},
"tracker": {
"blur": 0.00085997581481933594,
"landmark": {
"count": 106,
"data": "xxxxx"
},
"pose": {
"pitch": -3.7135705947875977,
"roll": 3.0353362560272217,
"yaw": -23.293550491333008
},
"rect": {
"bottom": 797,
"left": 428,
"right": 675,
"top": 585
},
"snapType": "",
"trackId": 41
}
}],
"label": 1
}
Parameter Description
Function Syntax
{
"image": {
"bioType":"palm",
"data":"/9j/4AAQSkZJRgABA",
"format":"gray",
"width":720,
"height":1280
},
"feature" : "true",
"palmInfo" : "true",
"picture" : "true"
}
Parameter Description
After calling the palm detection interface, the pre-registration template and the verification
template will get returned. Here the verification template is for de-duplication judgment, and the
pre-registration template is to merge the registration template.
When the number of pre-registered templates reaches 5, it is required to call the merge palm
template interface to obtain the merged registration template. And thus, the registration template
registers the detected palm.
Function Syntax
{
"data" : {
"palms" : [
{
"feature" : {
"preTemplate" : "xxxxxxx",
"preTemplateSize" : 98448,
"verTemplate" : "xxxxxx",
"verTemplateSize" : 26448
},
"palmInfo" : {
"imageQuality" : 90,
"rect" : {
"x0" : 585,
"x1" : 0,
"x2" : 0,
"x3" : 499,
"y0" : 447,
"y1" : 340,
"y2" : 818,
"y3" : 925
},
"templateQuality" : 50
}
}
]
},
"detail" : "success",
"status" : 0
}
Parameter Description
Function Syntax
{
"data": {
"palm": {
"feature": {
"mergeTemplate": "xxxxxxxx",
"mergeTemplateSize": 8844
}
}
},
"detail": "success",
"status": 0
}
Parameter Description
Is it
Parameter Description
Required
feature Yes The merged palm registration template
Data reply status value. 0 means success, please refer to
status Yes
[Appendix 4] for others.
Function Syntax
{
"label": 5,
"palm": [{
"feature": {
"verTemplate": "xxxxxxx",
"verTemplateSize": 26448
},
"trackInfo": {
"imageQuality": 134,
"rect": {
"x0": 527,
"x1": 13,
"x2": 10,
"x3": 523,
"y0": 354,
"y1": 349,
"y2": 760,
"y3": 764
}
}
}]
}
Parameter Description
Function Syntax
{
"commonSettings": {
"NIRLiveness": true,
"VLLiveness": false,
"attendInterval": 5000,
"attrInterval": 0,
"attributeRecog": true,
"countAlgorithm": false,
"debugLevel": 0,
"drawTrackRect": false,
"enableStoreAttendLog": true,
"enableStoreStrangerAttLog": false,
"faceAEEnabled": true,
"hacknessThreshold": 0.99000000953674316,
"infraredPictureFormat": "jpeg",
"enableStoreAttendPhoto": false,
"isTrackingMatchMode": true,
"recogInterval": 1000,
"recogRespirator": false,
"recogThreshold": 0.89999997615814209,
"scoringInterval": 5
}
}
Call AMTHID_GetConfig to get COMMON_CONFIG, and the JSON data obtained is as follows:
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"commonSettings": {
"NIRLiveness": true,
"VLLiveness": false,
"attendInterval": 5000,
"attrInterval": 0,
"attributeRecog": true,
"countAlgorithm": false,
"debugLevel": 0,
"drawTrackRect": false,
"enableStoreAttendLog": true,
"enableStoreStrangerAttLog": false,
"faceAEEnabled": true,
"hacknessThreshold": 0.99000000953674316,
"infraredPictureFormat": "jpeg",
"isTrackingMatchMode": true,
"enableStoreAttendPhoto": false,
"recogInterval": 1000,
"recogRespirator": false,
"recogThreshold": 0.89999997615814209,
"scoringInterval": 5
}
}
}
Parameter Description
Is it
Parameter Description
Required
NIRLiveness No NIR liveness detection
Set by calling the CAPTURE_FILTER_CONFIG of [AMTHID_SetConfig], and set the JSON data
format as follows:
Function Syntax
{
"captureFilter": {
"blurThreshold": 30,
"frontThreshold": 50,
"heightMaxValue": 400,
"heightMinValue": 40,
"pitchMaxValue": 30,
"pitchMinValue": -30,
"rollMaxValue": 30,
"rollMinValue": -30,
"scoreThreshold": 30,
"widthMaxValue": 400,
"widthMinValue": 40,
"yawMaxValue": 30,
"yawMinValue": -30
}
}
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"captureFilter": {
"blurThreshold": 30,
"frontThreshold": 50,
"heightMaxValue": 400,
"heightMinValue": 40,
"pitchMaxValue": 30,
"pitchMinValue": -30,
"rollMaxValue": 30,
"rollMinValue": -30,
"scoreThreshold": 30,
"widthMaxValue": 400,
"widthMinValue": 40,
"yawMaxValue": 30,
"yawMinValue": -30
}
}
}
Parameter Description
Function Syntax
{
"MotionDetectionSetting": {
"brightnessThreshold": 240,
"idleTimeOutMS": 11000,
"motionDetectFunOn": true,
"sensitivityThreshold": 5
}
}
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"MotionDetectionSetting": {
"brightnessThreshold": 240,
"idleTimeOutMS": 11000,
"motionDetectFunOn": true,
"sensitivityThreshold": 5
}
}
}
Parameter Description
Function Syntax
{
"PALMSetting": {
"imageQualityThreshold": 60,
"palmFunOn": true,
"palmIdentifyThreshold": 576,
"palmRunState": "match",
"palmSupportHeight": 1280,
"palmSupportWidth": 720,
"templateQualityThreshold": 20
}
}
PALM_CONFIG can be obtained through [AMTHID_GetConfig], and the obtained JSON data
format is as follows:
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"PALMSetting": {
"imageQualityThreshold": 60,
"palmFunOn": true,
"palmIdentifyThreshold": 576,
"palmRunState": "match",
"palmSupportHeight": 1280,
"palmSupportWidth": 720,
"templateQualityThreshold": 20
}
}
}
Parameter Description
Is it
Parameter Description
Required
Palm function is turned on or not;
palmFunOn Yes
Value: "true"/"false";
Call the DEVICE_INFORMATION of [AMTHID_GetConfig], and the JSON data format of the
device information is as follows:
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"deviceInfo": {
"gSDK_VERSION": "0.0.0.33fix4-APP_29-20200825-1658-0-F0001-
gDEP_VERSION=75-gOBJ_VERSION=76",
"app": "APP_29",
"cpID": "050046ef",
"devKey": "02e8e8c90673ef66397740185d4d9020",
"sn": "200628-0317",
"hidVer": "V1.3.8",
"firmVer": "0.3.8UN_33f4-20200826T191308"
}
}
}
Parameter Description
Function Syntax
{
"syncTime":"2020-11-23 16:44:52"
}
DEVICE_TIME can be obtained through [AMTHID_GetConfig], and the obtained JSON data
format is as follows:
Function Syntax
{
"data" : {
"sysTime" : "2020-11-23 16:44:54"
},
"detail" : "success",
"status" : 0
}
Parameter Description
Is it
Parameter Description
Required
sysTime Yes Device time
Data reply status value. 0 means success, please refer to
status Yes
[Appendix 4] for others.
4.5.1 Snapshot
Through the HID command, the frame of the current image can be captured and return to the
host.
Function Syntax
{
"data": {
"snapshot": {
"data": "xxxxxxxxxx",
"frameId": 163847,
"height": 1280,
"timeStamp": 6656928,
"type": "jpeg",
"width": 720
}
},
"detail": "success",
"status": 0
}
Parameter Description
Function Syntax
{
"personId": "12345",
"groupId": "DA640D7CE7544B33A3A1C81CD95D3E66 ",
"userId": "12345",
"name": "name1",
"age": 30,
"gender": "male",
"updateTime": "20200331123025",
"image": [{
"bioType": "face",
"data": "/9j/4AAQSkZJRgABA",
"format": "jpeg",
"width": 720,
"height": 1280
},
{
"bioType": "palm",
"data": "/9j/4AAQSkZJRgABA",
"format": "gray",
"width": 720,
"height": 1280
}
],
"features": [{
"bioType": "face",
"data":
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size": 1024
},
{
"bioType": "palm",
"data":
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size": 1024
}
]
}
Parameter Description
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"personId": "12345"
}
}
Function Syntax
{
"personId": "570"
}
Parameter Description
The format of the JSON data returned by the deleted user is as follows:
Function Syntax
{
"status": 0,
"detail": "success"
}
Function Syntax
{
"status": 0,
"detail": "success"
}
Function Syntax
{
"personId": "123456",
"data": [{
"bioType": "face",
"feature": true,
"picture": true
},
{
"bioType": "palm",
"feature": true
}
]
}
Parameter Description
The format of the JSON data returned by the query user is as follows:
Function Syntax
{
"data": {
"age": -1,
"features": [{
"bioType": "face",
"data": "xxxxx",
"size": 1024
},
{
"bioType": "face",
"data": "xxxxxx",
"size": 1024
},
{
"bioType": "palm",
"data": "xxxxxxx",
"size": 8844
},
{
"bioType": "palm",
"data": "xxxxxxx",
"size": 8844
}
],
"gender": "male",
"groupId": "",
"images": [{
"bioType": "face",
"data": "",
"format": "jpeg",
"height": 983,
"width": 612
},
{
"bioType": "face",
"data": "",
"format": "jpeg",
"height": 800,
"width": 578
}
],
"name": "1180665",
"personId": "1180665",
"updateTime": "20201102175244",
"userId": "1180665"
},
"detail": "success",
"status": 0
}
Parameter Description
The JSON data format for querying all user information is as follows:
Function Syntax
{
"pageIndex" : 1,
"pageSize" : 20
}
Parameter Description
Function Syntax
{
"data": [{
"age": -1,
"face": 2,
"gender": "male",
"groupId": "",
"name": "2855N",
"palm": 1,
"personId": "2855",
"updateTime": "20201016191450",
"userId": "2855"
}
],
"detail": "success",
"status": 0
Parameter Description
Function Syntax
{
"data" : {
"databaseSize" : 40960,
"faceCount" : 0,
"featureCount" : 0,
"featureSize" : 16,
"groupCount" : 0,
"palmCount" : 0,
"palmFeatureCount" : 0,
"palmFeatureSize" : 16,
"personCount" : 1,
"pictureCount" : 1,
"pictureSize" : 16
},
"detail" : "success",
"status" : 0
}
Parameter Description
The JSON data format for querying matching record count is as follows.
Function Syntax
{
"startTime" : "2019-10-01 10:00:00",
Parameter Description
The JSON data format returned by querying matching record count is as follows:
Function Syntax
{
"detail" : "success",
"startId" : 1,
"status" : 0,
"totalCount" : 1
}
Parameter Description
Is it
Parameter Description
Required
startId Yes Starting index of matching records
Function Syntax
{
"startId" : 1,
"reqCount" : 20,
"needImg" : false
}
Parameter Description
Function Syntax
{
"data" : [
{
"authType" : "face",
"deviceid" : "05004700",
"groupId" : "",
"id" : 1,
"name" : "kobe",
"personId" : "kobe",
"respirator" : 0,
"timestamp" : "2020-12-10 15:55:28.677",
"userid" : "kobe"
}
],
"detail" : "success",
"recordCount" : 1,
"status" : 0
}
Parameter Description
The JSON data format returned by clearing all matching records is as follows:
Function Syntax
{
"status": 0,
"detail": "success"
}
The polling process is through [AMTHID_PollMatchResult], and the face JSON data format
returned during polling is as follows:
Function Syntax
{
"events": [{
"label": 1,
"face": [{
"identify": [{
"groupId": "",
"name": "3123",
"personId": "q123",
"similarity": 0.9328765869140625,
"userId": "q123"
}]
}]
}]
}
The palm JSON data format of the reply during polling is as follows:
Function Syntax
{
"events": [{
"label": 5,
"palm": [{
"identify": [{
"groupId": "",
"name": "3123",
"personId": "q123",
"similarity": 705,
"userId": "q123"
}]
}]
}]
}
Parameter Description
Developers can add one or more face images to the designated users through local photos.
Function Syntax
{
"personId": "12345",
"image": [
{
"bioType":"face",
"data":"/9j/4AAQSkZJRgABA",
"format":"jpeg",
"width":720,
"height":1280
},
{
"bioType":"face",
"data":"/9j/4AAQSkZJRgABA",
"format":"jpeg",
"width":720,
"height":1280
}
]
}
Parameter Description
Function Syntax
{
"status": 0,
"detail": "success"
}
The face is added to the designated users in the module through face templates that have been
registered locally or face templates registered on other devices.
Function Syntax
{
"personId": "12345",
"features": [
{
"bioType":"face",
"data" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size" : 1024
},
{
"bioType":"face",
"data" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size" : 1024
}
]
}
Parameter Description
Function Syntax
{
"status": 0,
"detail": "success"
}
Developers can add palm images to designated users through local photos.
Function Syntax
{
"personId": "12345",
"images": [
{
"bioType":"palm",
"data":"/9j/4AAQSkZJRgABA",
"format":"gray",
"width":720,
"height":1280
},
{
"bioType":"palm",
"data":"/9j/4AAQSkZJRgABA",
"format":"gray",
"width":720,
"height":1280
}
]
}
Parameter Description
Function Syntax
{
"status": 0,
"detail": "success"
}
Users can add palms to designated users in the module through the palm templates that have
been registered locally or the palm templates registered on other devices.
Function Syntax
{
"personId": "12345",
"features": [
{
"bioType":"palm",
"data" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size" : 1024
},
{
"bioType":"palm",
"data" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size" : 1024
}
]
}
Parameter Description
Response Syntax
{
"status": 0,
"detail": "success"
}
• After entering the registration mode, the module will stop the verification mode and
create a maximum of 32 cache space. This cache space stores the data related to face
and palm registration.
• After exiting the registration mode, the module will restore the verification mode and
clear all data in the cache space.
To enter the registration mode without additional parameters, send the Reg Start command.
{
"status": 0,
"detail": "success"
}
To exit the registration mode without additional parameters, send the Reg End command.
{
"status": 0,
"detail": "success"
}
3. Detect Face
The user can use the face photo or the video stream in the module, in the cache registration
mode, by sending the DETECT_FACE_REG command to obtain the Cache Id corresponding to
the face and the required information.
Function Syntax
{
"image": {
"bioType":"face",
"data":"/9j/4AAQSkZJRgABA",
"format":"jpeg",
"width":720,
"height":1280
},
"feature" : "true",
"faceInfo" : "true",
"picture" : "true"
}
Parameter Description
Is it
Parameter Description
Required
Image of registered face. If this parameter is empty, the module will
image No
directly take a frame of image from the stream for registration by
default.
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"faces":[
{
"faceInfo" : {
"attribute" : {
"age" : 30,
"beauty" : -1,
"cap" : 0,
"expression" : 0,
"eye" : -1,
"gender" : 0,
"glasses" : -1,
"mouth" : -1,
"mustache" : 1,
"nation" : -1,
"respirator" : 0,
"skinColor" : 0,
"smile" : -1
},
"pose" : {
"pitch" : 3.5096845626831055,
"roll" : -2.404015064239502,
"yaw" : -13.170290946960449
},
"rect" : {
"bottom" : 888,
"left" : 167,
"right" : 507,
"top" : 562
},
"landmark" : {
"count" : 106,
"data" :
"EAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGwiT0lyPS7/ZYEvf2WBL0CMCO9/pW3vAP9"
},
"score": 0.808082
},
"feature" : {
"bioType":"face",
"data" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"size" : 1024
},
"picture": {
"bioType":"face",
"data":"/9j/4AAQSkZJRgABA",
"format":"jpeg",
"width":720,
"height":1280
},
"cacheId":{
"bioType":"face",
"data":1
}
}
]
}
}
Parameter Description
faces Yes One or more face data returned when registering a face
The returned face template information. If the registration
feature No
request is true, it will return, otherwise the information will not be
returned.
By adding the face CacheID generated by detecting the face in the cache mode, the detected
face will get added to the specified user in the module.
Function Syntax
{
"personId": "12345",
"cacheIds":[
{
"bioType":"face",
"data":1
},
{
"bioType":"face",
"data":2
}
]
}
Parameter Description
{
"status": 0,
"detail": "success"
}
5. Detect Palm
The user can use the palm photo or the video stream in the module to send the
DETECT_PALM_REG command in the cache registration mode to obtain the corresponding palm
pre-registration template Cache Id and required palm information.
Function Syntax
{
"image": {
"bioType":"palm",
"data":"/9j/4AAQSkZJRgABA",
"format":"gray",
"width":720,
"height":1280
},
"feature" : "true",
"palmInfo" : "true",
"picture" : "true"
}
Parameter Description
Function Syntax
{
"status": 0,
"detail": "success",
"data": {
"palms":[
{
"palmInfo" : {
"rect" : {
"x0" : 156,
"y0" : 222,
"x1" : 356,
"y1" : 222,
"x2" : 888,
"y2" : 167,
"x3" : 507,
"y3" : 562
},
"imageQuality": 90,
"templateQuality": 40
},
"feature" : {
"verTemplate" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"verTemplateSize" : 26448,
"preTemplate" :
"5C+ju39I273/lGq9gLAJvv+WhL39lgQ9AjCjvEAKAj4E/Eu8AWLgPH7ixr3/loS9fq7vPYGw",
"preTemplateSize" : 98448
},
"picture" : {
"bioType":"palm",
"data":"/9j/4AAQSkZJRgABA",
"format":"gray",
"width":720,
"height":1280
},
"cacheId":
{
"bioType":"palm",
"data":[1]
}
}
]
}
}
Parameter Description
palms Yes One or more palm data returned when registering a palm
The returned palm template information. If the registration
feature No request is true, it will return the data, otherwise the information
will not be returned.
The returned registered palm image. If the registration request
picture No is true, it will return the data, otherwise the information will not
be returned.
The returned palm information. If the registration request is
palmInfo No true, it will return the data, otherwise the information will not be
returned.
cacheId No The returned palm cache information Id.
Data reply status value. 0 means success, please refer to
status Yes
[Appendix 4] for others.
When the CacheId pre-registration template obtained by palm detection is 5, the merged
registration template is acquired by sending the CacheId pre-registration template via the
MERGE PALM REG command.
{
"feature" : true,
"cacheIds":[
{
"bioType":"palm",
"data":1
},
{
"bioType":"palm",
"data":2
},
{
"bioType":"palm",
"data":3
},
{
"bioType":"palm",
"data":4
},
{
"bioType":"palm",
"data":5
}
]
}
Parameter Description
{
"status": 0,
"detail": "success",
"data":{
"palm":{
"feature":{
"mergeTemplate" : "xxx",
"mergeTemplateSize" : 8844
},
"cacheId":{
"bioType":"palm",
"data":1
}
}
}
}
Parameter Description
By merging the palm registration template CacheID generated after caching the palms, you can
add palms to designated users in the module. The JSON data format of the added palm is as
follows:
{
"personId": "12345",
"cacheIds":[
{
"bioType":"palm",
"data":1
}
]
}
Parameter Description
{
"status": 0,
"detail": "success"
}
Due to the limited memory space of the module, the cache registration mode has a maximum of
32 storage spaces for caching. And if the user needs to remove the cached data that does not
meet the requirements can be deleted to free up more space for filtering.
{
"cacheId":{
"bioType":"face",
"data":1
}
}
Parameter Description
5 Appendix
0 Success
505 The server failed to open the file Failed to open file.
507 The server failed to read the file Failed to read the file
508 Failed to write the file on the server Failed to write the file
510 Failed to traverse the file directory Failed to traverse the file list.
Failed to call the face quality analysis It may be related to the incoming face
538
interface Landmark parameter.
The DSP corresponding to the
540 DSP is not enabled
algorithm is not started.
541 Face detection call failed Failed to call the face detection API.
Calling the face detection API does
not detect the face, generally
542 No face detected
because the picture's face is not clear
enough.
Generally, the face is not clear
543 Face feature extraction failed
enough.
Does not support the attribute The attribute analysis interface is not
544
analysis initialized, or the initialization fails.
E-mail: [email protected]
www.armatura.us