Skip to content

Commit c2d0ea6

Browse files
Added v11.4.2
1 parent 35cd1a1 commit c2d0ea6

File tree

8 files changed

+2731
-122
lines changed

8 files changed

+2731
-122
lines changed

SimpleHTMLApp/README.md

Lines changed: 93 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Acuant JavaScript Web SDK v11.4.1
1+
# Acuant JavaScript Web SDK v11.4.2
22

33

4-
**July 2020**
4+
**November 2020**
55

66
See [https://github.com/Acuant/JavascriptWebSDKV11/releases](https://github.com/Acuant/JavascriptWebSDKV11/releases) for release notes.
77

@@ -20,7 +20,7 @@ This document provides detailed information about the Acuant JavaScript Web SDK.
2020

2121
## Updates
2222

23-
**v11.4.0:** Please review [v11.4.0 Migration Details](docs/MigrationDetail11.4.0.md) for migration details.
23+
**v11.4.2:** Please review [v11.4.2 Migration Details](docs/MigrationDetail11.4.2.md) for migration details.
2424

2525
----------
2626

@@ -31,9 +31,9 @@ The SDK includes the following modules:
3131
**Acuant JavaScript SDK (AcuantJavaScriptSdk.min.js):**
3232

3333
- Live Document Capture functionality
34-
- Face Capture with Passive Liveness available with credentials
35-
- Additional Camera UI provided by Acuant.
3634
- Uses Acuant library to detect documents, crop, calculate sharpness and glare.
35+
- Additional Camera UI provided by Acuant.
36+
- Face Capture with Passive Liveness using credentials
3737

3838
**Acuant Image Service (AcuantImageProcessingService.js.mem):**
3939

@@ -54,9 +54,9 @@ The SDK includes the following modules:
5454

5555
1. Load AcuantJavascriptSdk script:
5656

57-
<script async src="AcuantJavascriptSdk.min.js" />
57+
<script async src="AcuantJavascriptWebSdk.min.js"></script>
5858

59-
1. Definte a custom path to load files (if different than root):
59+
1. Define a custom path to load files (if different than root):
6060

6161
const acuantConfig = {
6262
path: "/custom/path/to/sdk/"
@@ -69,87 +69,19 @@ The SDK includes the following modules:
6969
//sdk has been loaded;
7070
}
7171
72-
----------
73-
## AcuantPassiveLiveness
74-
75-
Acuant recommends using the **LiveAssessment** property rather than the score) to evaluate response. **AcuantPassiveLiveness.startSelfieCapture** will return a rescaled image.
76-
77-
Follow these recommendations to effectively process an image for passive liveness:
78-
#### Image requirements
79-
- **Height**: minimum 480 pixels; recommended 720 or 1080 pixels
80-
- **Compression**: Image compression is not recommended (JPEG 70 level or above is acceptable). For best results, use uncompressed images.
81-
82-
#### Face requirements
83-
- Out-of-plane rotation: Face pitch and yaw angle: from -20 to 20 degrees +/-3 degrees
84-
- In-plane rotation: Face roll angle: from -30 to 30 degrees +/- 3 degrees
85-
- Pupillary distance: Minimum distance between the eyes 90 +/- 5 pixels
86-
- Face size: Minimum 200 pixels in either dimension
87-
- Faces per image: 1
88-
- Sunglasses: Must be removed
89-
90-
#### Capture requirements
91-
The following may significantly increase errors or false results:
92-
93-
- Using a motion blur effect
94-
- Texture filtering
95-
- A spotlight on the face and nearest surroundings
96-
- An environment with poor lighting or colored light
97-
98-
**Note** The use of fish-eye lenses is not supported by this API.
99-
100-
### Start face capture and send Passive Liveness request
101-
102-
1. Start face capture.
103-
104-
AcuantPassiveLiveness.startSelfieCapture(callback:function(base64img){
105-
//called with result
106-
})
107-
108-
1. Send Passive Liveness Request.
109-
110-
AcuantPassiveLiveness.postLiveness({
111-
endpoint: "ACUANT_PASSIVE_LIVENESS_ENDPOINT",
112-
token: "ACUANT_PASSIVE_LIVENESS_TOKEN",
113-
subscriptionId: "ACUANT_PASSIVE_LIVENESS_SUBSCRIPTIONID",
114-
image: base64img
115-
}, function(result){
116-
result = {
117-
LivenessResult = {
118-
LivenessAssessment : String =
119-
//POSSIBLE VALUES
120-
"Live",
121-
"NotLive",
122-
"PoorQuality",
123-
"Error";
124-
Score: 0
125-
},
126-
Error: "",//error description
127-
ErrorCode: String =
128-
//POSSIBLE VALUES
129-
"Unknown",
130-
"FaceTooClose",
131-
"FaceNotFound",
132-
"FaceTooSmall",
133-
"FaceAngleTooLarge",
134-
"FailedToReadImage",
135-
"InvalidRequest",
136-
"InvalidRequestSettings",
137-
"Unauthorized",
138-
"NotFound"
139-
}
140-
})
141-
14272
----------
14373
## Live Capture using WebRTC
14474

75+
Live capture offers guidance to the user to position documents and initiates autocapture when detected. This feature is present only when WebRTC is available in the browser.
76+
14577
**Supported browsers**
14678

14779
The JavaScript Web SDK supports the following web browsers for live capture of ID documents:
14880

14981
- **Android**: Chrome
15082
- **iOS**: Safari, with iOS version <= 13.0
15183

152-
For other browsers, regular HTML capture is used.
84+
For other browsers that do not support WebRTC, the device's camera app (manual capture) is used.
15385

15486
**Camera Preview**
15587

@@ -159,7 +91,7 @@ For other browsers, regular HTML capture is used.
15991
**Tap to Capture**
16092

16193
- Tap to capture will be enabled for devices that can support the resolution constraints, but cannot support the image processing.
162-
- Upon launching the camera, we will check the speed of image processing. If the speed is above the threshold, tap to capture will be enabled.
94+
- When the camera is launched, the image processing speed is automatically checked. If the speed is above the threshold set at 300ms, live document detection and autocapture features are disabled and switched to tap to capture. The user will have to manually capture the document.
16395

16496

16597
----------
@@ -172,14 +104,14 @@ For other browsers, regular HTML capture is used.
172104
1. Initialize the Worker. (**Note**: If worker has not been started, this call will start the Worker.)
173105

174106
function initialize(
175-
token : string, //token provided by Acuant
176-
endpoint : string, //Acuant endpoint
107+
token : string, //Acuant credentials in base64 (basic auth format id:pass)
108+
endpoint : string, //endpoint for Acuant's ACAS server
177109
callback: object); //callback shown below
178110

179111
var callback = {
180112
onSuccess:function(){
181113
},
182-
onFail:function(){
114+
onFail:function(code, description){
183115
}
184116
}
185117

@@ -195,7 +127,7 @@ For other browsers, regular HTML capture is used.
195127
----------
196128
## AcuantCameraUI
197129

198-
- Uses AcuantCamera to access native camera.
130+
- Uses AcuantCamera to access device's native camera. AcuantCameraUI applies to the WebRTC live capture UI.
199131
- Default implementation of UI. Use AcuantCamera directly for any custom UI.
200132

201133
**Prerequisite**: Initialize Acuant Worker (see Step 2 above).
@@ -263,13 +195,13 @@ For other browsers, regular HTML capture is used.
263195
----------
264196

265197
## AcuantCamera
266-
198+
- WebRTC is used for live capture when available; otherwise, use manual capture.
267199
**Prerequisite:**
268200
Initialize Acuant Worker (see Step 2 above).
269201

270202
1. Add HTML:
271-
272-
<video id="acuant-player" controls autoplay style="display:none;" playsinline></video>
203+
204+
<video id="acuant-player" controls autoplay style="display:none;" playsinline></video>
273205
<canvas id="acuant-video-canvas" width="100%" height="auto"></canvas>
274206
275207
1. Start the Camera Preview:
@@ -298,7 +230,7 @@ For other browsers, regular HTML capture is used.
298230

299231
AcuantCamera.start((response) => {
300232
response = {
301-
//type of document
233+
//type of document
302234
type: AcuantCamera.ACUANT_DOCUMENT_TYPE,
303235
304236
//state of camera
@@ -341,11 +273,11 @@ For other browsers, regular HTML capture is used.
341273
}
342274
});
343275
344-
1. Manual Capture:
276+
1. Start manual capture (when WebRTC live capture is unavailable)
345277

346-
**IMPORTANT**: AcuantCamera manual capture uses \<input type="file"/> html tags to access the native camera. This REQUIRES a user initiated event to start the camera.
278+
**IMPORTANT**: AcuantCamera manual capture uses `<input type="file"/>` html tags to access the device's camera app. This REQUIRES a user initiated event to start the camera.
347279

348-
**NOTE**: We recommend not hiding any UI elements when starting manual capture. Be aware users will be able to cancel out of the native camera screen.
280+
**NOTE**: Acuant recommends not hiding any UI elements when starting manual capture. Be aware users will be able to cancel out of the device's camera app screen.
349281
350282
AcuantCamera.startManualCapture({
351283
onCaptured: function(response){
@@ -436,7 +368,78 @@ For other browsers, regular HTML capture is used.
436368

437369

438370
-------------------------------------------------------------
371+
## Face Capture and Acuant Passive Liveness
372+
**Prerequisite:**
373+
Credentials with Acuant Passive Liveness enabled
374+
375+
Acuant recommends using the **LiveAssessment** property rather than the score) to evaluate response. **AcuantPassiveLiveness.startSelfieCapture** will return a rescaled image.
376+
377+
Follow these recommendations to effectively process an image for passive liveness:
378+
#### Image requirements
379+
- **Height**: minimum 480 pixels; recommended 720 or 1080 pixels
380+
- **Compression**: Image compression is not recommended (JPEG 70 level or above is acceptable). For best results, use uncompressed images.
381+
382+
#### Face requirements
383+
- Out-of-plane rotation: Face pitch and yaw angle: from -20 to 20 degrees +/-3 degrees
384+
- In-plane rotation: Face roll angle: from -30 to 30 degrees +/- 3 degrees
385+
- Pupillary distance: Minimum distance between the eyes 90 +/- 5 pixels
386+
- Face size: Minimum 200 pixels in either dimension
387+
- Faces per image: 1
388+
- Sunglasses: Must be removed
389+
390+
#### Capture requirements
391+
The following may significantly increase errors or false results:
392+
393+
- Using a motion blur effect
394+
- Texture filtering
395+
- A spotlight on the face and nearest surroundings
396+
- An environment with poor lighting or colored light
397+
398+
**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.
399+
400+
### Start face capture and send Passive Liveness request
401+
402+
1. Start face capture with device's camera app.
403+
404+
AcuantPassiveLiveness.startSelfieCapture(callback:function(base64img){
405+
//called with result
406+
})
407+
408+
1. Upload face image and send request for Passive Liveness result.
439409

410+
AcuantPassiveLiveness.postLiveness({
411+
endpoint: "ACUANT_PASSIVE_LIVENESS_ENDPOINT",
412+
token: "ACUANT_PASSIVE_LIVENESS_TOKEN",
413+
subscriptionId: "ACUANT_PASSIVE_LIVENESS_SUBSCRIPTIONID",
414+
image: base64img
415+
}, function(result){
416+
result = {
417+
LivenessResult = {
418+
LivenessAssessment : String =
419+
//POSSIBLE VALUES
420+
"Live",
421+
"NotLive",
422+
"PoorQuality",
423+
"Error";
424+
Score: 0
425+
},
426+
Error: "",//error description
427+
ErrorCode: String =
428+
//POSSIBLE VALUES
429+
"Unknown",
430+
"FaceTooClose",
431+
"FaceNotFound",
432+
"FaceTooSmall",
433+
"FaceAngleTooLarge",
434+
"FailedToReadImage",
435+
"InvalidRequest",
436+
"InvalidRequestSettings",
437+
"Unauthorized",
438+
"NotFound"
439+
}
440+
})
441+
442+
----------
440443
**Copyright 2020 Acuant Inc. All rights reserved.**
441444

442445
This document contains proprietary and confidential information and creative works owned by Acuant and its respective licensors, if any. Any use, copying, publication, distribution, display, modification, or transmission of such technology, in whole or in part, in any form or by any means, without the prior express written permission of Acuant is strictly prohibited. Except where expressly provided by Acuant in writing, possession of this information shall not be construed to confer any license or rights under any Acuant intellectual property rights, whether by estoppel, implication, or otherwise.

0 commit comments

Comments
 (0)