@regulaforensics/face-sdk 6.5.67-beta → 6.5.84-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/RNFaceSDK.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/examples/capacitor/README.md +4 -4
- package/examples/capacitor/package.json +5 -5
- package/examples/capacitor/scripts/android.sh +9 -0
- package/examples/capacitor/scripts/ios.sh +8 -0
- package/examples/capacitor/scripts/setup.sh +4 -0
- package/examples/cordova/README.md +4 -4
- package/examples/cordova/package.json +6 -11
- package/examples/cordova/scripts/android.sh +8 -0
- package/examples/cordova/scripts/ios.sh +8 -0
- package/examples/cordova/scripts/setup.sh +5 -0
- package/examples/ionic/README.md +4 -4
- package/examples/ionic/package.json +5 -5
- package/examples/ionic/scripts/android.sh +8 -0
- package/examples/ionic/scripts/ios.sh +8 -0
- package/examples/ionic/scripts/setup.sh +5 -0
- package/examples/ionic/src/app/home/home.page.ts +56 -5
- package/examples/react-native/README.md +4 -4
- package/examples/react-native/ios/Podfile.lock +319 -303
- package/examples/react-native/package.json +5 -6
- package/examples/react-native/scripts/android.sh +8 -0
- package/examples/react-native/scripts/ios.sh +8 -0
- package/examples/react-native/scripts/setup.sh +8 -0
- package/package.json +2 -1
- package/plugin.xml +2 -2
- package/www/capacitor/customization/customization.js +66 -0
- package/www/capacitor/customization/customization_colors.js +233 -0
- package/www/capacitor/customization/customization_fonts.js +106 -0
- package/www/capacitor/customization/customization_images.js +129 -0
- package/www/capacitor/customization/font.js +29 -0
- package/www/capacitor/detect_faces/detect_face_result.js +38 -0
- package/www/capacitor/detect_faces/detect_faces_attribute.js +15 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +14 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +30 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +67 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +24 -0
- package/www/capacitor/detect_faces/detect_faces_scenario.js +10 -0
- package/www/capacitor/face_capture/face_capture_config.js +28 -0
- package/www/capacitor/face_capture/face_capture_exception.js +25 -0
- package/www/capacitor/face_capture/face_capture_image.js +26 -0
- package/www/capacitor/face_capture/face_capture_response.js +17 -0
- package/www/capacitor/image_params/output_image_crop.js +21 -0
- package/www/capacitor/image_params/output_image_params.js +9 -0
- package/www/capacitor/image_params/point.js +14 -0
- package/www/capacitor/image_params/rect.js +18 -0
- package/www/capacitor/image_params/size.js +9 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +24 -0
- package/www/capacitor/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/capacitor/image_quality/image_quality_group.js +332 -0
- package/www/capacitor/image_quality/image_quality_range.js +26 -0
- package/www/capacitor/image_quality/image_quality_result.js +40 -0
- package/www/capacitor/index.js +179 -4
- package/www/capacitor/init/face_sdk_version.js +16 -0
- package/www/capacitor/match_faces/compared_face.js +21 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +23 -0
- package/www/capacitor/match_faces/compared_faces_split.js +22 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +14 -0
- package/www/capacitor/match_faces/match_faces_config.js +12 -0
- package/www/capacitor/match_faces/match_faces_detection.js +25 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +28 -0
- package/www/capacitor/match_faces/match_faces_exception.js +30 -0
- package/www/capacitor/match_faces/match_faces_image.js +25 -0
- package/www/capacitor/match_faces/match_faces_request.js +13 -0
- package/www/capacitor/match_faces/match_faces_response.js +28 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +9 -0
- package/www/capacitor/person_database/image_upload.js +16 -0
- package/www/capacitor/person_database/pageable_item_list.js +22 -0
- package/www/capacitor/person_database/person.js +22 -0
- package/www/capacitor/person_database/person_database.js +145 -0
- package/www/capacitor/person_database/person_group.js +18 -0
- package/www/capacitor/person_database/person_image.js +22 -0
- package/www/capacitor/person_database/search_person.js +31 -0
- package/www/capacitor/person_database/search_person_detection.js +22 -0
- package/www/capacitor/person_database/search_person_image.js +26 -0
- package/www/capacitor/person_database/search_person_request.js +17 -0
- package/www/cordova.js +3478 -385
- package/www/react-native/customization/customization.js +66 -0
- package/www/react-native/customization/customization_colors.js +233 -0
- package/www/react-native/customization/customization_fonts.js +106 -0
- package/www/react-native/customization/customization_images.js +129 -0
- package/www/react-native/customization/font.js +29 -0
- package/www/react-native/detect_faces/detect_face_result.js +38 -0
- package/www/react-native/detect_faces/detect_faces_attribute.js +15 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/react-native/detect_faces/detect_faces_config.js +14 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +30 -0
- package/www/react-native/detect_faces/detect_faces_request.js +67 -0
- package/www/react-native/detect_faces/detect_faces_response.js +24 -0
- package/www/react-native/detect_faces/detect_faces_scenario.js +10 -0
- package/www/react-native/face_capture/face_capture_config.js +28 -0
- package/www/react-native/face_capture/face_capture_exception.js +25 -0
- package/www/react-native/face_capture/face_capture_image.js +26 -0
- package/www/react-native/face_capture/face_capture_response.js +17 -0
- package/www/react-native/image_params/output_image_crop.js +21 -0
- package/www/react-native/image_params/output_image_params.js +9 -0
- package/www/react-native/image_params/point.js +14 -0
- package/www/react-native/image_params/rect.js +18 -0
- package/www/react-native/image_params/size.js +9 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +24 -0
- package/www/react-native/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/react-native/image_quality/image_quality_group.js +332 -0
- package/www/react-native/image_quality/image_quality_range.js +26 -0
- package/www/react-native/image_quality/image_quality_result.js +40 -0
- package/www/react-native/index.js +179 -4
- package/www/react-native/init/face_sdk_version.js +16 -0
- package/www/react-native/match_faces/compared_face.js +21 -0
- package/www/react-native/match_faces/compared_faces_pair.js +23 -0
- package/www/react-native/match_faces/compared_faces_split.js +22 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +14 -0
- package/www/react-native/match_faces/match_faces_config.js +12 -0
- package/www/react-native/match_faces/match_faces_detection.js +25 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +28 -0
- package/www/react-native/match_faces/match_faces_exception.js +30 -0
- package/www/react-native/match_faces/match_faces_image.js +25 -0
- package/www/react-native/match_faces/match_faces_request.js +13 -0
- package/www/react-native/match_faces/match_faces_response.js +28 -0
- package/www/react-native/person_database/edit_group_persons_request.js +9 -0
- package/www/react-native/person_database/image_upload.js +16 -0
- package/www/react-native/person_database/pageable_item_list.js +22 -0
- package/www/react-native/person_database/person.js +22 -0
- package/www/react-native/person_database/person_database.js +145 -0
- package/www/react-native/person_database/person_group.js +18 -0
- package/www/react-native/person_database/person_image.js +22 -0
- package/www/react-native/person_database/search_person.js +31 -0
- package/www/react-native/person_database/search_person_detection.js +22 -0
- package/www/react-native/person_database/search_person_image.js +26 -0
- package/www/react-native/person_database/search_person_request.js +17 -0
- package/www/types/customization/customization.d.ts +46 -0
- package/www/types/customization/customization_colors.d.ts +37 -0
- package/www/types/customization/customization_fonts.d.ts +23 -0
- package/www/types/customization/customization_images.d.ts +24 -0
- package/www/types/customization/font.d.ts +41 -0
- package/www/types/detect_faces/detect_face_result.d.ts +16 -0
- package/www/types/detect_faces/detect_faces_attribute.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_attribute_result.d.ts +11 -0
- package/www/types/detect_faces/detect_faces_backend_exception.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_config.d.ts +37 -0
- package/www/types/detect_faces/detect_faces_exception.d.ts +24 -0
- package/www/types/detect_faces/detect_faces_request.d.ts +80 -0
- package/www/types/detect_faces/detect_faces_response.d.ts +12 -0
- package/www/types/detect_faces/detect_faces_scenario.d.ts +10 -0
- package/www/types/face_capture/face_capture_config.d.ts +39 -0
- package/www/types/face_capture/face_capture_exception.d.ts +17 -0
- package/www/types/face_capture/face_capture_image.d.ts +39 -0
- package/www/types/face_capture/face_capture_response.d.ts +9 -0
- package/www/types/image_params/output_image_crop.d.ts +49 -0
- package/www/types/image_params/output_image_params.d.ts +28 -0
- package/www/types/image_params/point.d.ts +9 -0
- package/www/types/image_params/rect.d.ts +8 -0
- package/www/types/image_params/size.d.ts +6 -0
- package/www/types/image_quality/image_quality_characteristic.d.ts +7 -0
- package/www/types/image_quality/image_quality_characteristic_name.d.ts +61 -0
- package/www/types/image_quality/image_quality_group.d.ts +418 -0
- package/www/types/image_quality/image_quality_range.d.ts +8 -0
- package/www/types/image_quality/image_quality_result.d.ts +30 -0
- package/www/types/index.d.ts +140 -4
- package/www/types/init/face_sdk_version.d.ts +16 -0
- package/www/types/match_faces/compared_face.d.ts +29 -0
- package/www/types/match_faces/compared_faces_pair.d.ts +36 -0
- package/www/types/match_faces/compared_faces_split.d.ts +8 -0
- package/www/types/match_faces/match_faces_backend_exception.d.ts +6 -0
- package/www/types/match_faces/match_faces_config.d.ts +14 -0
- package/www/types/match_faces/match_faces_detection.d.ts +30 -0
- package/www/types/match_faces/match_faces_detection_face.d.ts +43 -0
- package/www/types/match_faces/match_faces_exception.d.ts +21 -0
- package/www/types/match_faces/match_faces_image.d.ts +34 -0
- package/www/types/match_faces/match_faces_request.d.ts +34 -0
- package/www/types/match_faces/match_faces_response.d.ts +27 -0
- package/www/types/person_database/edit_group_persons_request.d.ts +8 -0
- package/www/types/person_database/image_upload.d.ts +20 -0
- package/www/types/person_database/pageable_item_list.d.ts +7 -0
- package/www/types/person_database/person.d.ts +33 -0
- package/www/types/person_database/person_database.d.ts +95 -0
- package/www/types/person_database/person_group.d.ts +22 -0
- package/www/types/person_database/person_image.d.ts +10 -0
- package/www/types/person_database/search_person.d.ts +31 -0
- package/www/types/person_database/search_person_detection.d.ts +11 -0
- package/www/types/person_database/search_person_image.d.ts +25 -0
- package/www/types/person_database/search_person_request.d.ts +39 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const DetectFacesAttribute = {
|
|
2
|
+
AGE: "Age",
|
|
3
|
+
EYE_RIGHT: "EyeRight",
|
|
4
|
+
EYE_LEFT: "EyeLeft",
|
|
5
|
+
EMOTION: "Emotion",
|
|
6
|
+
SMILE: "Smile",
|
|
7
|
+
GLASSES: "Glasses",
|
|
8
|
+
HEAD_COVERING: "HeadCovering",
|
|
9
|
+
FOREHEAD_COVERING: "ForeheadCovering",
|
|
10
|
+
MOUTH: "Mouth",
|
|
11
|
+
MEDICAL_MASK: "MedicalMask",
|
|
12
|
+
OCCLUSION: "Occlusion",
|
|
13
|
+
STRONG_MAKEUP: "StrongMakeup",
|
|
14
|
+
HEADPHONES: "Headphones",
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ImageQualityRange } from '../image_quality/image_quality_range'
|
|
2
|
+
|
|
3
|
+
export class DetectFacesAttributeResult {
|
|
4
|
+
attribute
|
|
5
|
+
value
|
|
6
|
+
range
|
|
7
|
+
confidence
|
|
8
|
+
|
|
9
|
+
static fromJson(jsonObject) {
|
|
10
|
+
if (jsonObject == null) return null
|
|
11
|
+
const result = new DetectFacesAttributeResult()
|
|
12
|
+
|
|
13
|
+
result.attribute = jsonObject["attribute"]
|
|
14
|
+
result.value = jsonObject["value"]
|
|
15
|
+
result.range = ImageQualityRange.fromJson(jsonObject["range"])
|
|
16
|
+
result.confidence = jsonObject["confidence"]
|
|
17
|
+
|
|
18
|
+
return result
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class DetectFacesBackendException {
|
|
2
|
+
code
|
|
3
|
+
message
|
|
4
|
+
|
|
5
|
+
static fromJson(jsonObject) {
|
|
6
|
+
if (jsonObject == null) return null
|
|
7
|
+
const result = new DetectFacesBackendException()
|
|
8
|
+
|
|
9
|
+
result.code = jsonObject["code"]
|
|
10
|
+
result.message = jsonObject["message"] ?? ""
|
|
11
|
+
|
|
12
|
+
return result
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const DetectFacesBackendErrorCode = {
|
|
17
|
+
FR_FACE_NOT_DETECTED: 2,
|
|
18
|
+
FACER_NO_LICENSE: 200,
|
|
19
|
+
FACER_IS_NOT_INITIALIZED: 201,
|
|
20
|
+
FACER_COMMAND_IS_NOT_SUPPORTED: 202,
|
|
21
|
+
FACER_COMMAND_PARAMS_READ_ERROR: 203,
|
|
22
|
+
UNDEFINED: -1,
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class DetectFacesConfig {
|
|
2
|
+
attributes
|
|
3
|
+
customQuality
|
|
4
|
+
outputImageParams
|
|
5
|
+
onlyCentralFace
|
|
6
|
+
|
|
7
|
+
constructor(params) {
|
|
8
|
+
this.onlyCentralFace = false
|
|
9
|
+
this.attributes = params?.attributes
|
|
10
|
+
this.customQuality = params?.customQuality
|
|
11
|
+
this.outputImageParams = params?.outputImageParams
|
|
12
|
+
this.onlyCentralFace = params?.onlyCentralFace ?? this.onlyCentralFace
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DetectFacesBackendException } from "./detect_faces_backend_exception"
|
|
2
|
+
|
|
3
|
+
export class DetectFacesException {
|
|
4
|
+
code
|
|
5
|
+
message
|
|
6
|
+
underlyingError
|
|
7
|
+
|
|
8
|
+
static fromJson(jsonObject) {
|
|
9
|
+
if (jsonObject == null) return null
|
|
10
|
+
const result = new DetectFacesException()
|
|
11
|
+
|
|
12
|
+
result.code = jsonObject["code"]
|
|
13
|
+
result.message = jsonObject["message"] ?? ""
|
|
14
|
+
result.underlyingError = DetectFacesBackendException.fromJson(jsonObject["underlyingError"])
|
|
15
|
+
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const DetectFacesErrorCode = {
|
|
21
|
+
IMAGE_EMPTY: 0,
|
|
22
|
+
FR_FACE_NOT_DETECTED: 1,
|
|
23
|
+
FACER_NO_LICENSE: 2,
|
|
24
|
+
FACER_IS_NOT_INITIALIZED: 3,
|
|
25
|
+
FACER_COMMAND_IS_NOT_SUPPORTED: 4,
|
|
26
|
+
FACER_COMMAND_PARAMS_READ_ERROR: 5,
|
|
27
|
+
PROCESSING_FAILED: 6,
|
|
28
|
+
REQUEST_FAILED: 7,
|
|
29
|
+
API_CALL_FAILED: 8,
|
|
30
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export class DetectFacesRequest {
|
|
2
|
+
image
|
|
3
|
+
configuration
|
|
4
|
+
tag
|
|
5
|
+
|
|
6
|
+
constructor(image, configuration, params) {
|
|
7
|
+
this.image = image
|
|
8
|
+
this.configuration = configuration
|
|
9
|
+
this.tag = params?.tag
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static qualityFull(image) {
|
|
13
|
+
const result = new DetectFacesRequest()
|
|
14
|
+
result.image = image
|
|
15
|
+
result.scenario = DetectFacesScenario.QUALITY_FULL
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static qualityICAO(image) {
|
|
20
|
+
const result = new DetectFacesRequest()
|
|
21
|
+
result.image = image
|
|
22
|
+
result.scenario = DetectFacesScenario.QUALITY_ICAO
|
|
23
|
+
return result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static qualityVisaSchengen(image) {
|
|
27
|
+
const result = new DetectFacesRequest()
|
|
28
|
+
result.image = image
|
|
29
|
+
result.scenario = DetectFacesScenario.QUALITY_VISA_SCHENGEN
|
|
30
|
+
return result
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static qualityVisaUSA(image) {
|
|
34
|
+
const result = new DetectFacesRequest()
|
|
35
|
+
result.image = image
|
|
36
|
+
result.scenario = DetectFacesScenario.QUALITY_VISA_USA
|
|
37
|
+
return result
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static cropCentralFace(image) {
|
|
41
|
+
const result = new DetectFacesRequest()
|
|
42
|
+
result.image = image
|
|
43
|
+
result.scenario = DetectFacesScenario.CROP_CENTRAL_FACE
|
|
44
|
+
return result
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static cropAllFaces(image) {
|
|
48
|
+
const result = new DetectFacesRequest()
|
|
49
|
+
result.image = image
|
|
50
|
+
result.scenario = DetectFacesScenario.CROP_ALL_FACES
|
|
51
|
+
return result
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static thumbnail(image) {
|
|
55
|
+
const result = new DetectFacesRequest()
|
|
56
|
+
result.image = image
|
|
57
|
+
result.scenario = DetectFacesScenario.THUMBNAIL
|
|
58
|
+
return result
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static allAttributes(image) {
|
|
62
|
+
const result = new DetectFacesRequest()
|
|
63
|
+
result.image = image
|
|
64
|
+
result.scenario = DetectFacesScenario.ATTRIBUTES_ALL
|
|
65
|
+
return result
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DetectFaceResult } from './detect_face_result'
|
|
2
|
+
import { DetectFacesException } from './detect_faces_exception'
|
|
3
|
+
|
|
4
|
+
export class DetectFacesResponse {
|
|
5
|
+
detection
|
|
6
|
+
scenario
|
|
7
|
+
error
|
|
8
|
+
allDetections
|
|
9
|
+
|
|
10
|
+
static fromJson(jsonObject) {
|
|
11
|
+
if (jsonObject == null) return null
|
|
12
|
+
const result = new DetectFacesResponse()
|
|
13
|
+
|
|
14
|
+
result.detection = DetectFaceResult.fromJson(jsonObject["detection"])
|
|
15
|
+
result.scenario = jsonObject["scenario"]
|
|
16
|
+
result.error = DetectFacesException.fromJson(jsonObject["error"])
|
|
17
|
+
result.allDetections = []
|
|
18
|
+
if (jsonObject["allDetections"] != null)
|
|
19
|
+
for (const item of jsonObject["allDetections"])
|
|
20
|
+
result.allDetections.push(DetectFaceResult.fromJson(item))
|
|
21
|
+
|
|
22
|
+
return result
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const DetectFacesScenario = {
|
|
2
|
+
CROP_CENTRAL_FACE: "CropCentralFace",
|
|
3
|
+
CROP_ALL_FACES: "CropAllFaces",
|
|
4
|
+
THUMBNAIL: "Thumbnail",
|
|
5
|
+
ATTRIBUTES_ALL: "AttributesAll",
|
|
6
|
+
QUALITY_FULL: "QualityFull",
|
|
7
|
+
QUALITY_ICAO: "QualityICAO",
|
|
8
|
+
QUALITY_VISA_SCHENGEN: "QualityVisaSchengen",
|
|
9
|
+
QUALITY_VISA_USA: "QualityVisaUSA",
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CameraPosition } from '../customization/camera_position'
|
|
2
|
+
import { ScreenOrientation } from '../customization/screen_orientation'
|
|
3
|
+
|
|
4
|
+
export class FaceCaptureConfig {
|
|
5
|
+
copyright
|
|
6
|
+
cameraSwitchEnabled
|
|
7
|
+
closeButtonEnabled
|
|
8
|
+
torchButtonEnabled
|
|
9
|
+
vibrateOnSteps
|
|
10
|
+
cameraPositionIOS
|
|
11
|
+
screenOrientation
|
|
12
|
+
cameraPositionAndroid
|
|
13
|
+
timeout
|
|
14
|
+
holdStillDuration
|
|
15
|
+
|
|
16
|
+
constructor(params) {
|
|
17
|
+
this.copyright = params?.copyright ?? true
|
|
18
|
+
this.cameraSwitchEnabled = params?.cameraSwitchEnabled ?? false
|
|
19
|
+
this.closeButtonEnabled = params?.closeButtonEnabled ?? true
|
|
20
|
+
this.torchButtonEnabled = params?.torchButtonEnabled ?? true
|
|
21
|
+
this.vibrateOnSteps = params?.vibrateOnSteps ?? true
|
|
22
|
+
this.cameraPositionIOS = params?.cameraPositionIOS ?? CameraPosition.FRONT
|
|
23
|
+
this.screenOrientation = params?.screenOrientation ?? [ScreenOrientation.PORTRAIT]
|
|
24
|
+
this.cameraPositionAndroid = params?.cameraPositionAndroid
|
|
25
|
+
this.timeout = params?.timeout
|
|
26
|
+
this.holdStillDuration = params?.holdStillDuration
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class FaceCaptureException {
|
|
2
|
+
code
|
|
3
|
+
message
|
|
4
|
+
|
|
5
|
+
static fromJson(jsonObject) {
|
|
6
|
+
if (jsonObject == null) return null
|
|
7
|
+
const result = new FaceCaptureException()
|
|
8
|
+
|
|
9
|
+
result.code = jsonObject["code"]
|
|
10
|
+
result.message = jsonObject["message"] ?? ""
|
|
11
|
+
|
|
12
|
+
return result
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const FaceCaptureErrorCode = {
|
|
17
|
+
CANCEL: 0,
|
|
18
|
+
TIMEOUT: 1,
|
|
19
|
+
NOT_INITIALIZED: 2,
|
|
20
|
+
SESSION_START_FAILED: 3,
|
|
21
|
+
CAMERA_NOT_AVAILABLE: 4,
|
|
22
|
+
CAMERA_NO_PERMISSION: 5,
|
|
23
|
+
IN_PROGRESS_ALREADY: 6,
|
|
24
|
+
CONTEXT_IS_NULL: 7,
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class FaceCaptureImage {
|
|
2
|
+
imageType
|
|
3
|
+
image
|
|
4
|
+
tag
|
|
5
|
+
|
|
6
|
+
static fromJson(jsonObject) {
|
|
7
|
+
if (jsonObject == null) return null
|
|
8
|
+
const result = new FaceCaptureImage()
|
|
9
|
+
|
|
10
|
+
result.imageType = jsonObject["imageType"]
|
|
11
|
+
result.image = jsonObject["image"]
|
|
12
|
+
result.tag = jsonObject["tag"]
|
|
13
|
+
|
|
14
|
+
return result
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const ImageType = {
|
|
19
|
+
PRINTED: 1,
|
|
20
|
+
RFID: 2,
|
|
21
|
+
LIVE: 3,
|
|
22
|
+
DOCUMENT_WITH_LIVE: 4,
|
|
23
|
+
EXTERNAL: 5,
|
|
24
|
+
GHOST_PORTRAIT: 6,
|
|
25
|
+
BARCODE: 7,
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FaceCaptureImage } from './face_capture_image'
|
|
2
|
+
import { FaceCaptureException } from './face_capture_exception'
|
|
3
|
+
|
|
4
|
+
export class FaceCaptureResponse {
|
|
5
|
+
error
|
|
6
|
+
image
|
|
7
|
+
|
|
8
|
+
static fromJson(jsonObject) {
|
|
9
|
+
if (jsonObject == null) return null
|
|
10
|
+
const result = new FaceCaptureResponse()
|
|
11
|
+
|
|
12
|
+
result.error = FaceCaptureException.fromJson(jsonObject["error"])
|
|
13
|
+
result.image = FaceCaptureImage.fromJson(jsonObject["image"])
|
|
14
|
+
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class OutputImageCrop {
|
|
2
|
+
type
|
|
3
|
+
size
|
|
4
|
+
padColor
|
|
5
|
+
returnOriginalRect
|
|
6
|
+
|
|
7
|
+
constructor(type, params) {
|
|
8
|
+
this.type = type
|
|
9
|
+
this.size = params?.size
|
|
10
|
+
this.padColor = params?.padColor
|
|
11
|
+
this.returnOriginalRect = params?.returnOriginalRect ?? false
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const OutputImageCropAspectRatio = {
|
|
16
|
+
RATIO_3X4: 0,
|
|
17
|
+
RATIO_4X5: 1,
|
|
18
|
+
RATIO_2X3: 2,
|
|
19
|
+
RATIO_1X1: 3,
|
|
20
|
+
RATIO_7X9: 4,
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class Rect {
|
|
2
|
+
bottom
|
|
3
|
+
top
|
|
4
|
+
left
|
|
5
|
+
right
|
|
6
|
+
|
|
7
|
+
static fromJson(jsonObject) {
|
|
8
|
+
if (jsonObject == null) return null
|
|
9
|
+
const result = new Rect()
|
|
10
|
+
|
|
11
|
+
result.bottom = jsonObject["bottom"]
|
|
12
|
+
result.top = jsonObject["top"]
|
|
13
|
+
result.left = jsonObject["left"]
|
|
14
|
+
result.right = jsonObject["right"]
|
|
15
|
+
|
|
16
|
+
return result
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class ImageQualityCharacteristic {
|
|
2
|
+
characteristicName
|
|
3
|
+
recommendedRange
|
|
4
|
+
customRange
|
|
5
|
+
color
|
|
6
|
+
|
|
7
|
+
static _create(name, params) {
|
|
8
|
+
var result = new ImageQualityCharacteristic()
|
|
9
|
+
result.characteristicName = name
|
|
10
|
+
result.recommendedRange = params?.recommended
|
|
11
|
+
result.customRange = params?.custom
|
|
12
|
+
result.color = params?.color
|
|
13
|
+
return result
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
withCustomRange(min, max) {
|
|
17
|
+
this.customRange = new ImageQualityRange(min, max)
|
|
18
|
+
return this
|
|
19
|
+
}
|
|
20
|
+
withCustomValue(value) {
|
|
21
|
+
this.customRange = ImageQualityRange.withValue(value)
|
|
22
|
+
return this
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export const ImageQualityCharacteristicName = {
|
|
2
|
+
IMAGE_WIDTH: "ImageWidth",
|
|
3
|
+
IMAGE_HEIGHT: "ImageHeight",
|
|
4
|
+
IMAGE_WIDTH_TO_HEIGHT: "ImageWidthToHeight",
|
|
5
|
+
IMAGE_CHANNELS_NUMBER: "ImageChannelsNumber",
|
|
6
|
+
ART_FACE: "ArtFace",
|
|
7
|
+
PADDING_RATIO: "PaddingRatio",
|
|
8
|
+
FACE_MID_POINT_HORIZONTAL_POSITION: "FaceMidPointHorizontalPosition",
|
|
9
|
+
FACE_MID_POINT_VERTICAL_POSITION: "FaceMidPointVerticalPosition",
|
|
10
|
+
HEAD_WIDTH_RATIO: "HeadWidthRatio",
|
|
11
|
+
HEAD_HEIGHT_RATIO: "HeadHeightRatio",
|
|
12
|
+
EYES_DISTANCE: "EyesDistance",
|
|
13
|
+
YAW: "Yaw",
|
|
14
|
+
PITCH: "Pitch",
|
|
15
|
+
ROLL: "Roll",
|
|
16
|
+
BLUR_LEVEL: "BlurLevel",
|
|
17
|
+
NOISE_LEVEL: "NoiseLevel",
|
|
18
|
+
UNNATURAL_SKIN_TONE: "UnnaturalSkinTone",
|
|
19
|
+
FACE_DYNAMIC_RANGE: "FaceDynamicRange",
|
|
20
|
+
EYE_RIGHT_CLOSED: "EyeRightClosed",
|
|
21
|
+
EYE_LEFT_CLOSED: "EyeLeftClosed",
|
|
22
|
+
EYE_RIGHT_OCCLUDED: "EyeRightOccluded",
|
|
23
|
+
EYE_LEFT_OCCLUDED: "EyeLeftOccluded",
|
|
24
|
+
EYES_RED: "EyesRed",
|
|
25
|
+
EYE_RIGHT_COVERED_WITH_HAIR: "EyeRightCoveredWithHair",
|
|
26
|
+
EYE_LEFT_COVERED_WITH_HAIR: "EyeLeftCoveredWithHair",
|
|
27
|
+
OFF_GAZE: "OffGaze",
|
|
28
|
+
TOO_DARK: "TooDark",
|
|
29
|
+
TOO_LIGHT: "TooLight",
|
|
30
|
+
FACE_GLARE: "FaceGlare",
|
|
31
|
+
SHADOWS_ON_FACE: "ShadowsOnFace",
|
|
32
|
+
SHOULDERS_POSE: "ShouldersPose",
|
|
33
|
+
EXPRESSION_LEVEL: "ExpressionLevel",
|
|
34
|
+
MOUTH_OPEN: "MouthOpen",
|
|
35
|
+
SMILE: "Smile",
|
|
36
|
+
DARK_GLASSES: "DarkGlasses",
|
|
37
|
+
REFLECTION_ON_GLASSES: "ReflectionOnGlasses",
|
|
38
|
+
FRAMES_TOO_HEAVY: "FramesTooHeavy",
|
|
39
|
+
FACE_OCCLUDED: "FaceOccluded",
|
|
40
|
+
HEAD_COVERING: "HeadCovering",
|
|
41
|
+
FOREHEAD_COVERING: "ForeheadCovering",
|
|
42
|
+
STRONG_MAKEUP: "StrongMakeup",
|
|
43
|
+
HEAD_PHONES: "Headphones",
|
|
44
|
+
MEDICAL_MASK: "MedicalMask",
|
|
45
|
+
BACKGROUND_UNIFORMITY: "BackgroundUniformity",
|
|
46
|
+
SHADOWS_ON_BACKGROUND: "ShadowsOnBackground",
|
|
47
|
+
OTHER_FACES: "OtherFaces",
|
|
48
|
+
BACKGROUND_COLOR_MATCH: "BackgroundColorMatch",
|
|
49
|
+
UNKNOWN: "Unknown",
|
|
50
|
+
IMAGE_CHARACTERISTIC_ALL_RECOMMENDED: "ImageCharacteristic",
|
|
51
|
+
HEAD_SIZE_AND_POSITION_ALL_RECOMMENDED: "HeadSizeAndPosition",
|
|
52
|
+
FACE_IMAGE_QUALITY_ALL_RECOMMENDED: "FaceImageQuality",
|
|
53
|
+
EYES_CHARACTERISTICS_ALL_RECOMMENDED: "EyesCharacteristics",
|
|
54
|
+
SHADOW_AND_LIGHTING_ALL_RECOMMENDED: "ShadowsAndLightning",
|
|
55
|
+
POSE_AND_EXPRESSION_ALL_RECOMMENDED: "PoseAndExpression",
|
|
56
|
+
HEAD_OCCLUSION_ALL_RECOMMENDED: "HeadOcclusion",
|
|
57
|
+
QUALITY_BACKGROUND_ALL_RECOMMENDED: "QualityBackground",
|
|
58
|
+
}
|