@regulaforensics/face-sdk 6.3.94-beta → 6.3.95-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/capacitor/package.json +1 -1
- package/examples/cordova/package.json +1 -1
- package/examples/ionic/package.json +1 -1
- package/examples/react-native/package.json +1 -1
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/www/types/customization/camera_position.d.ts +9 -0
- package/www/types/customization/customization.d.ts +19 -0
- package/www/types/customization/customization_colors.d.ts +6 -0
- package/www/types/customization/customization_fonts.d.ts +6 -0
- package/www/types/customization/customization_images.d.ts +6 -0
- package/www/types/customization/font.d.ts +17 -0
- package/www/types/detect_faces/detect_faces_config.d.ts +18 -0
- package/www/types/detect_faces/detect_faces_exception.d.ts +3 -0
- package/www/types/detect_faces/detect_faces_request.d.ts +53 -0
- package/www/types/face_capture/face_capture_config.d.ts +9 -0
- package/www/types/face_capture/face_capture_image.d.ts +24 -0
- package/www/types/image_params/output_image_crop.d.ts +24 -0
- package/www/types/image_params/output_image_params.d.ts +15 -0
- package/www/types/image_params/point.d.ts +3 -0
- package/www/types/image_quality/image_quality_characteristic.d.ts +3 -0
- package/www/types/image_quality/image_quality_characteristic_name.d.ts +3 -0
- package/www/types/image_quality/image_quality_group.d.ts +263 -0
- package/www/types/init/face_sdk_version.d.ts +9 -0
- package/www/types/init/init_config.d.ts +9 -0
- package/www/types/liveness/liveness_config.d.ts +66 -0
- package/www/types/liveness/liveness_notification.d.ts +3 -0
- package/www/types/liveness/liveness_response.d.ts +24 -0
- package/www/types/match_faces/compared_face.d.ts +18 -0
- package/www/types/match_faces/compared_faces_pair.d.ts +24 -0
- package/www/types/match_faces/match_faces_detection.d.ts +18 -0
- package/www/types/match_faces/match_faces_detection_face.d.ts +30 -0
- package/www/types/match_faces/match_faces_image.d.ts +18 -0
- package/www/types/match_faces/match_faces_request.d.ts +16 -0
- package/www/types/match_faces/match_faces_response.d.ts +15 -0
- package/www/types/person_database/image_upload.d.ts +14 -0
- package/www/types/person_database/person.d.ts +23 -0
- package/www/types/person_database/person_database.d.ts +3 -0
- package/www/types/person_database/person_group.d.ts +14 -0
- package/www/types/person_database/search_person.d.ts +16 -0
- package/www/types/person_database/search_person_image.d.ts +13 -0
- package/www/types/person_database/search_person_request.d.ts +24 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lint": "eslint"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@regulaforensics/face-sdk": "6.3.
|
|
18
|
+
"@regulaforensics/face-sdk": "6.3.95-beta",
|
|
19
19
|
"@regulaforensics/face-core-basic": "6.3.12-beta",
|
|
20
20
|
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
21
21
|
"@awesome-cordova-plugins/file": "6.6.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "Regula Forensics Inc.",
|
|
15
15
|
"license": "commercial",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@regulaforensics/face-sdk": "6.3.
|
|
17
|
+
"@regulaforensics/face-sdk": "6.3.95-beta",
|
|
18
18
|
"@regulaforensics/face-core-basic": "6.3.12-beta",
|
|
19
19
|
"cordova-android": "12.0.1",
|
|
20
20
|
"cordova-ios": "7.0.1",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@regulaforensics/face-sdk": "6.3.
|
|
19
|
+
"@regulaforensics/face-sdk": "6.3.95-beta",
|
|
20
20
|
"@regulaforensics/face-core-basic": "6.3.12-beta",
|
|
21
21
|
"cordova-plugin-camera": "7.0.0",
|
|
22
22
|
"@awesome-cordova-plugins/camera": "6.6.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.95-beta",
|
|
4
4
|
"description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/face-sdk" version="6.3.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="6.3.95-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
4
|
<description>Cordova plugin for Regula Face SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Physical position of camera's hardware on the system.
|
|
3
|
+
*/
|
|
1
4
|
export enum CameraPosition {
|
|
5
|
+
/**
|
|
6
|
+
* The camera position corresponds to the front camera.
|
|
7
|
+
*/
|
|
2
8
|
FRONT,
|
|
9
|
+
/**
|
|
10
|
+
* The camera position corresponds to the back camera.
|
|
11
|
+
*/
|
|
3
12
|
BACK,
|
|
4
13
|
}
|
|
@@ -2,6 +2,9 @@ import { CustomizationColors } from './customization_colors'
|
|
|
2
2
|
import { CustomizationFonts } from './customization_fonts'
|
|
3
3
|
import { CustomizationImages } from './customization_images'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Params that relate to the camera view controller customization and etc.
|
|
7
|
+
*/
|
|
5
8
|
export class Customization {
|
|
6
9
|
get colors(): CustomizationColors
|
|
7
10
|
set colors(val: CustomizationColors)
|
|
@@ -15,10 +18,26 @@ export class Customization {
|
|
|
15
18
|
get uiCustomizationLayer(): Record<string, any> | null
|
|
16
19
|
set uiCustomizationLayer(val: Record<string, any> | null)
|
|
17
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Set onClick listener for buttons from {@link uiCustomizationLayer}.
|
|
23
|
+
*/
|
|
18
24
|
set onCustomButtonTapped(completion: CustomButtonTappedCompletion)
|
|
19
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Allows you to deserialize object.
|
|
28
|
+
*/
|
|
20
29
|
static fromJson(jsonObject: Record<string, any>): Customization
|
|
30
|
+
/**
|
|
31
|
+
* Allows you to serialize object.
|
|
32
|
+
*/
|
|
21
33
|
toJson(): Record<string, any>
|
|
22
34
|
}
|
|
23
35
|
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Callback for receiving signal, when a custom button,
|
|
39
|
+
* configured in {@link Customization.uiCustomizationLayer}, is pressed.
|
|
40
|
+
*
|
|
41
|
+
* @param tag button id, indication which button was pressed.
|
|
42
|
+
*/
|
|
24
43
|
export type CustomButtonTappedCompletion = (tag: number) => void
|
|
@@ -26,6 +26,12 @@ export class CustomizationColors {
|
|
|
26
26
|
set processingScreenTitleLabel(val: number)
|
|
27
27
|
set successScreenBackground(val: number)
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Allows you to deserialize object.
|
|
31
|
+
*/
|
|
29
32
|
static fromJson(jsonObject: Record<string, number>): CustomizationColors
|
|
33
|
+
/**
|
|
34
|
+
* Allows you to serialize object.
|
|
35
|
+
*/
|
|
30
36
|
toJson(): Record<string, number>
|
|
31
37
|
}
|
|
@@ -12,6 +12,12 @@ export class CustomizationFonts {
|
|
|
12
12
|
set retryScreenHintLabels(val: Font | null)
|
|
13
13
|
set processingScreenLabel(val: Font | null)
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Allows you to deserialize object.
|
|
17
|
+
*/
|
|
15
18
|
static fromJson(jsonObject: Record<string, any>): CustomizationFonts
|
|
19
|
+
/**
|
|
20
|
+
* Allows you to serialize object.
|
|
21
|
+
*/
|
|
16
22
|
toJson(): Record<string, any>
|
|
17
23
|
}
|
|
@@ -13,6 +13,12 @@ export class CustomizationImages {
|
|
|
13
13
|
set processingScreenCloseButton(val: string)
|
|
14
14
|
set successScreenImage(val: string)
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Allows you to deserialize object.
|
|
18
|
+
*/
|
|
16
19
|
static fromJson(jsonObject: Record<string, string>): CustomizationImages
|
|
20
|
+
/**
|
|
21
|
+
* Allows you to serialize object.
|
|
22
|
+
*/
|
|
17
23
|
toJson(): Record<string, string>
|
|
18
24
|
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
export class Font {
|
|
2
|
+
/**
|
|
3
|
+
* Font family.
|
|
4
|
+
*
|
|
5
|
+
* Beware that Android and iOS have diffrent font names,
|
|
6
|
+
* so you will have to use if condition.
|
|
7
|
+
*/
|
|
2
8
|
get name(): string
|
|
9
|
+
/**
|
|
10
|
+
* Font size.
|
|
11
|
+
*/
|
|
3
12
|
get size(): number | null
|
|
13
|
+
/**
|
|
14
|
+
* Font style.
|
|
15
|
+
*
|
|
16
|
+
* Android only.
|
|
17
|
+
*/
|
|
4
18
|
get style(): FontStyle | null
|
|
5
19
|
|
|
6
20
|
constructor(
|
|
@@ -11,6 +25,9 @@ export class Font {
|
|
|
11
25
|
}
|
|
12
26
|
)
|
|
13
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Allows you to deserialize object.
|
|
30
|
+
*/
|
|
14
31
|
static fromJson(jsonObject?: any): Font | null
|
|
15
32
|
}
|
|
16
33
|
|
|
@@ -2,10 +2,28 @@ import { DetectFacesAttribute } from './detect_faces_attribute'
|
|
|
2
2
|
import { ImageQualityCharacteristic } from '../image_quality/image_quality_characteristic'
|
|
3
3
|
import { OutputImageParams } from '../image_params/output_image_params'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Custom configuration
|
|
7
|
+
*/
|
|
5
8
|
export class DetectFacesConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Current array for the face image detection attributes.
|
|
11
|
+
*/
|
|
6
12
|
attributes?: Array<DetectFacesAttribute>
|
|
13
|
+
/**
|
|
14
|
+
* Current array for the face image quality assessment rules.
|
|
15
|
+
*/
|
|
7
16
|
customQuality?: Array<ImageQualityCharacteristic>
|
|
17
|
+
/**
|
|
18
|
+
* If set the uploaded image is processed according to the indicated settings.
|
|
19
|
+
*/
|
|
8
20
|
outputImageParams?: OutputImageParams
|
|
21
|
+
/**
|
|
22
|
+
* Whether to process only the central face on the image or all the faces.
|
|
23
|
+
* If set to `true`, the SDK detects and processes only one—the most central face in the image.
|
|
24
|
+
* If set to `false`, the SDK processes all faces in the image.
|
|
25
|
+
* Default is `false`.
|
|
26
|
+
*/
|
|
9
27
|
onlyCentralFace: boolean
|
|
10
28
|
|
|
11
29
|
constructor(
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { DetectFacesConfig } from './detect_faces_config'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Detect Faces Request.
|
|
5
|
+
* Could be created by predefined scenarios (e.g: {@link DetectFacesRequest.qualityICAO}, {@link DetectFacesRequest.cropAllFaces} etc. )
|
|
6
|
+
* or by using custom {@link DetectFacesConfig}.
|
|
7
|
+
*/
|
|
3
8
|
export class DetectFacesRequest {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Create {@link DetectFacesRequest} object.
|
|
12
|
+
*
|
|
13
|
+
* @param image - Image base64.
|
|
14
|
+
* @param config - Custom Request configuration to specify image, quality, attributes parameters.
|
|
15
|
+
* @param params.tag - Defines tag that can be used in detect faces processing. Defaults to `null`.
|
|
16
|
+
*/
|
|
4
17
|
constructor(
|
|
5
18
|
image: string,
|
|
6
19
|
config: DetectFacesConfig,
|
|
@@ -9,19 +22,59 @@ export class DetectFacesRequest {
|
|
|
9
22
|
}
|
|
10
23
|
)
|
|
11
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Creates a request to check all the available quality characteristics.
|
|
27
|
+
*
|
|
28
|
+
* @param image - Image base64.
|
|
29
|
+
*/
|
|
12
30
|
static qualityFull(image: string): DetectFacesRequest
|
|
13
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Creates a request to check the quality characteristics based on the ICAO standard.
|
|
34
|
+
*
|
|
35
|
+
* @param image - Image base64.
|
|
36
|
+
*/
|
|
14
37
|
static qualityICAO(image: string): DetectFacesRequest
|
|
15
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Creates a request to check the quality characteristics based on the Schengen visa standard.
|
|
41
|
+
*
|
|
42
|
+
* @param image - Image base64.
|
|
43
|
+
*/
|
|
16
44
|
static qualityVisaSchengen(image: string): DetectFacesRequest
|
|
17
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Creates a request to check the quality characteristics based on the USA visa standard.
|
|
48
|
+
*
|
|
49
|
+
* @param image - Image base64.
|
|
50
|
+
*/
|
|
18
51
|
static qualityVisaUSA(image: string): DetectFacesRequest
|
|
19
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Creates a request for a cropped portrait of the person whose face is the most central.
|
|
55
|
+
*
|
|
56
|
+
* @param image - Image base64.
|
|
57
|
+
*/
|
|
20
58
|
static cropCentralFace(image: string): DetectFacesRequest
|
|
21
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Creates a request for cropped portraits of all the people in the image.
|
|
62
|
+
*
|
|
63
|
+
* @param image - Image base64.
|
|
64
|
+
*/
|
|
22
65
|
static cropAllFaces(image: string): DetectFacesRequest
|
|
23
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Creates a request for a cropped portrait of the person whose face is the most central in the image in the original size.
|
|
69
|
+
*
|
|
70
|
+
* @param image - Image base64.
|
|
71
|
+
*/
|
|
24
72
|
static thumbnail(image: string): DetectFacesRequest
|
|
25
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Creates a request for all available attribute results.
|
|
76
|
+
*
|
|
77
|
+
* @param image - Image base64.
|
|
78
|
+
*/
|
|
26
79
|
static allAttributes(image: string): DetectFacesRequest
|
|
27
80
|
}
|
|
@@ -7,8 +7,17 @@ export class FaceCaptureConfig {
|
|
|
7
7
|
closeButtonEnabled: boolean
|
|
8
8
|
torchButtonEnabled: boolean
|
|
9
9
|
vibrateOnSteps: boolean
|
|
10
|
+
/**
|
|
11
|
+
* Android only.
|
|
12
|
+
*/
|
|
10
13
|
cameraPositionAndroid?: number
|
|
14
|
+
/**
|
|
15
|
+
* IOS only.
|
|
16
|
+
*/
|
|
11
17
|
cameraPositionIOS: CameraPosition
|
|
18
|
+
/**
|
|
19
|
+
* Android only.
|
|
20
|
+
*/
|
|
12
21
|
screenOrientation?: Array<ScreenOrientation>
|
|
13
22
|
timeout?: number
|
|
14
23
|
holdStillDuration?: number
|
|
@@ -4,12 +4,36 @@ export class FaceCaptureImage {
|
|
|
4
4
|
get tag(): string | null
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The image type of {@link FaceCaptureImage} influences matching results and provides the information about the source of the image.
|
|
9
|
+
*/
|
|
7
10
|
export enum ImageType {
|
|
11
|
+
/**
|
|
12
|
+
* The image contains a printed portrait of a person.
|
|
13
|
+
*/
|
|
8
14
|
PRINTED,
|
|
15
|
+
/**
|
|
16
|
+
* The image contains a portrait of a person and is taken from the RFID chip.
|
|
17
|
+
*/
|
|
9
18
|
RFID,
|
|
19
|
+
/**
|
|
20
|
+
* The image is taken from the camera.
|
|
21
|
+
*/
|
|
10
22
|
LIVE,
|
|
23
|
+
/**
|
|
24
|
+
* The image contains a document with a portrait of a person.
|
|
25
|
+
*/
|
|
11
26
|
DOCUMENT_WITH_LIVE,
|
|
27
|
+
/**
|
|
28
|
+
* The image from an unknown source.
|
|
29
|
+
*/
|
|
12
30
|
EXTERNAL,
|
|
31
|
+
/**
|
|
32
|
+
* The image is a ghost portrait.
|
|
33
|
+
*/
|
|
13
34
|
GHOST_PORTRAIT,
|
|
35
|
+
/**
|
|
36
|
+
* The image from a barcode
|
|
37
|
+
*/
|
|
14
38
|
BARCODE
|
|
15
39
|
}
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import { Size } from './size'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Crop settings for {@link OutputImageParams}.
|
|
5
|
+
*/
|
|
3
6
|
export class OutputImageCrop {
|
|
7
|
+
/**
|
|
8
|
+
* The aspect ratio according to which alignment is performed.
|
|
9
|
+
*/
|
|
4
10
|
get type(): OutputImageCropAspectRatio
|
|
11
|
+
/**
|
|
12
|
+
* The resize value to process.
|
|
13
|
+
* If the value doesn't match AspectRatio `type` proportion or minimum size, an adjustment is applied.
|
|
14
|
+
* Use {@link OutputImageCropAspectRatio} to check you size matches AspectRatio `type` proportions and minimum size.
|
|
15
|
+
*/
|
|
5
16
|
get size(): Size | null
|
|
17
|
+
/**
|
|
18
|
+
* When an image is aligned by `type`, its original size may be insufficient, and in this case it needs to be supplemented, "padded".
|
|
19
|
+
* padColor sets the value for the color that will be used for such a supplement.
|
|
20
|
+
*/
|
|
6
21
|
get padColor(): number | null
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* If set, the coordinates of the rectangle with the face in the original image prepared for the face crop
|
|
25
|
+
* are returned in the {@link DetectFaceResult.originalRect} field.
|
|
26
|
+
* Default is `false`.
|
|
27
|
+
*/
|
|
7
28
|
get returnOriginalRect(): boolean
|
|
8
29
|
|
|
9
30
|
constructor(
|
|
@@ -16,6 +37,9 @@ export class OutputImageCrop {
|
|
|
16
37
|
)
|
|
17
38
|
}
|
|
18
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The AspectRatio according to which alignment is performed
|
|
42
|
+
*/
|
|
19
43
|
export enum OutputImageCropAspectRatio {
|
|
20
44
|
RATIO_3X4,
|
|
21
45
|
RATIO_4X5,
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { OutputImageCrop } from './output_image_crop'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Set of parameter for image processing.
|
|
5
|
+
*/
|
|
3
6
|
export class OutputImageParams {
|
|
7
|
+
/**
|
|
8
|
+
* If set, aligned and cropped portrait is returned in the crop field.
|
|
9
|
+
* Alignment is performed according to type.
|
|
10
|
+
* If a head on the original image is tilted, for the returned portrait it is aligned in a straight vertical line.
|
|
11
|
+
*
|
|
12
|
+
* If there are more than one face in the photo, all the faces will be detected and processed, and separate portraits for each face will be returned.
|
|
13
|
+
* So, if there were five people in the photo, you'll get five processed portraits.
|
|
14
|
+
*/
|
|
4
15
|
get crop(): OutputImageCrop | null
|
|
16
|
+
/**
|
|
17
|
+
* If set, the background color is replaced.
|
|
18
|
+
* The silhouette of a person is cut out and the background is filled with this color.
|
|
19
|
+
*/
|
|
5
20
|
get backgroundColor(): number | null
|
|
6
21
|
|
|
7
22
|
constructor(
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Quality parameter to include in {@link DetectFacesConfig} as {@link DetectFacesConfig.customQuality}.
|
|
3
|
+
*/
|
|
1
4
|
export class ImageQualityCharacteristic {
|
|
2
5
|
withCustomRange(min: number, max: number): ImageQualityCharacteristic
|
|
3
6
|
withCustomValue(value: number): ImageQualityCharacteristic
|