You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** OpenCV is only needed for AcuantPassiveLiveness module.
103
109
104
110
1. Define a custom path to load files (if different than root):
105
111
@@ -114,7 +120,7 @@ The SDK includes the following modules:
114
120
//sdk has been loaded;
115
121
}
116
122
117
-
**Note:** The SDK loads using a listener for DOMContentLoaded. If the scripts will be added to the page in a way that the listener won't be called (for example, in a single-page react application), once the SDK scripts are loaded in the page, manually call the following function:
123
+
**Note:** The SDK loads using a listener for DOMContentLoaded. If the scripts will be added to the page in a way that the listener won't be called (for example, in a single-page react application), once the SDK scripts are loaded in the page, manually call the following function:
118
124
119
125
loadAcuantSdk();
120
126
@@ -230,7 +236,7 @@ For other browsers that do not support WebRTC, the device's camera app (manual c
230
236
231
237
1. Add a viewport meta tag (if not already present) to prevent the video/ui from rendering at a much higher resolution than it needs to:
@@ -248,23 +254,23 @@ For other browsers that do not support WebRTC, the device's camera app (manual c
248
254
}
249
255
};
250
256
251
-
1. Set up callback to retrieve the image at each state of the camera. For more information on the processed image returned via **onCropped**, see [Image from AcuantCameraUI and AcuantCamera](#image-from-acuantcameraui-and-acuantcamera).
257
+
1. Set up callback to retrieve the image at each state of the camera. Be aware that cropping the image can fail and cause the **onCropped response to be undefined**. For more information on the processed image returned via **onCropped**, see [Image from AcuantCameraUI and AcuantCamera](#image-from-acuantcameraui-and-acuantcamera).
252
258
253
259
var cameraCallback = {
254
-
onCaptured: function(response){
260
+
onCaptured: function(response){
255
261
//document captured
256
262
//this is not the final result of processed image
257
263
//show a loading screen until onCropped is called
258
264
},
259
-
onCropped: function(response){
265
+
onCropped: function(response){
260
266
if (response) {
261
267
//use response
262
268
} else {
263
269
//cropping error
264
270
//restart capture
265
271
}
266
272
},
267
-
onFrameAvailable: function(response){
273
+
onFrameAvailable: function(response){
268
274
//this is optional
269
275
//Use only if you plan to display custom UI elements in addition to what is already displayed by the camera.
270
276
response = {
@@ -319,20 +325,19 @@ If you are not using AcuantCamerUI, and you want to use your own live capture UI
319
325
320
326
**Note:** Launching Live Capture after a Live Capture error directs users to Manual Capture. For best practice, do not rely on this behavior, and send users to Manual Capture from within your implementation.
321
327
322
-
1. Start manual capture. For more information on the processed image returned via **onCropped**, see [Image from AcuantCameraUI and AcuantCamera](#image-from-acuantcameraui-and-acuantcamera).
328
+
1. Start manual capture. Be aware that cropping the image can fail and cause the **onCropped response to be undefined**. For more information on the processed image returned via **onCropped**, see [Image from AcuantCameraUI and AcuantCamera](#image-from-acuantcameraui-and-acuantcamera).
323
329
324
330
AcuantCamera.startManualCapture({
325
-
onCaptured: function(response){
331
+
onCaptured: function(response){
326
332
//this will be called after user finishes capture
327
333
//then proceeds to crop
328
334
//onCropped will be called after finished
329
335
},
330
-
onCropped: function(response){
331
-
if(response){
336
+
onCropped: function(response){
337
+
if(response){
332
338
//cropped response;
333
339
334
-
}
335
-
else{
340
+
} else {
336
341
//Error occurred during cropping; retry capture
337
342
}
338
343
}
@@ -461,7 +466,7 @@ This information is for processing images manually if they are not captured thro
461
466
462
467
**Prerequisite:** To use the face capture and FaceID API, credentials with FaceID must be enabled.
463
468
464
-
Acuant recommends using the **LiveAssessment** property rather than the score) to evaluate response. **AcuantPassiveLiveness.startSelfieCapture** will return a rescaled image.
469
+
Acuant recommends using the **LiveAssessment** property rather than the score) to evaluate response. **AcuantPassiveLiveness.start** will return a rescaled image in onCaptured callback. The module supports real-time face detection only Android.
465
470
466
471
Follow these recommendations to effectively process an image for passive liveness:
467
472
#### Image requirements
@@ -484,52 +489,108 @@ The following may significantly increase errors or false results:
484
489
- A spotlight on the face and nearest surroundings
485
490
- An environment with poor lighting or colored light
486
491
487
-
**Note**: Face live capture and guidance is not supported, only manual capture is available. Also, the use of fish-eye lenses is not supported by this API.
492
+
**Note**: On iOS, real-time face detection is not supported, only manual capture is available. Also, the use of fish-eye lenses is not supported by this API.
488
493
489
494
### Start face capture and send Passive Liveness request
490
495
491
-
**Important:** Do not use this function for face capture if you are not using the Acuant FaceID API.
**Note:** On iOS calling ```AcuantPassiveLiveness.start``` will launch the native camera. Alternatively, the module exposes ```startManualCapture``` method that launches the native camera and returns the image taken in base64.
557
+
558
+
1. Upload face image and send request for Passive Liveness result:
0 commit comments