Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
en:quick_guide [2017/10/10 18:04] kyle |
en:quick_guide [2019/04/18 09:59] yjjung |
||
---|---|---|---|
Line 310: | Line 310: | ||
==== Add the face template ==== | ==== Add the face template ==== | ||
<WRAP indent> | <WRAP indent> | ||
- | Will be supported later. | + | Extracting the face template is done by 2 steps; \\ |
+ | 1. scanning the fingerprint image \\ | ||
+ | 2. extracting the template data \\ | ||
+ | |||
+ | Face template doesn't have verify step. | ||
+ | Once the extraction of the face template is completed, map the face template information to the structure. | ||
+ | |||
+ | <code cpp> | ||
+ | uint32_t deviceId = 1; | ||
+ | BS2SimpleDeviceInfo deviceInfo; | ||
+ | BS2UserBlob userBlob; | ||
+ | BS2Face Face[BS2_MAX_NUM_OF_FACE_PER_USER]; | ||
+ | |||
+ | if (deviceInfo.faceSupported) | ||
+ | { | ||
+ | int idx = 0; | ||
+ | uint32_t templateIndex = 0; | ||
+ | byte enrollThreshold; | ||
+ | int result = BS_SDK_SUCCESS; | ||
+ | |||
+ | |||
+ | |||
+ | for(; idx < BS2_MAX_NUM_OF_FACE_PER_USER; idx++) | ||
+ | { | ||
+ | result = BS2_ScanFace(context, deviceId, Face, enrollThreshold, NULL); | ||
+ | if(result != BS_SDK_SUCCESS) | ||
+ | { | ||
+ | //TODO handle error | ||
+ | break; | ||
+ | } | ||
+ | if(result == BS_SDK_SUCCESS) | ||
+ | { | ||
+ | Face[0].faceindext = idx; | ||
+ | userBlob.faceObjs= face[0] | ||
+ | } | ||
+ | |||
+ | } | ||
+ | } | ||
+ | </code> | ||
</WRAP> | </WRAP> | ||
</WRAP> | </WRAP> |