@regulaforensics/face-sdk 6.5.64-beta → 6.5.67-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 +1 -1
- package/examples/capacitor/README.md +4 -4
- package/examples/capacitor/package.json +4 -4
- package/examples/cordova/README.md +4 -4
- package/examples/cordova/package.json +10 -5
- package/examples/ionic/README.md +4 -4
- package/examples/ionic/package.json +4 -4
- package/examples/ionic/src/app/home/home.page.ts +5 -56
- package/examples/react-native/README.md +4 -4
- package/examples/react-native/ios/Podfile.lock +303 -319
- package/examples/react-native/package.json +5 -4
- package/package.json +1 -2
- package/plugin.xml +1 -1
- package/www/capacitor/index.js +4 -179
- package/www/cordova.js +406 -3499
- package/www/react-native/index.js +4 -179
- package/www/types/index.d.ts +4 -140
- package/examples/capacitor/scripts/android.sh +0 -9
- package/examples/capacitor/scripts/ios.sh +0 -8
- package/examples/capacitor/scripts/setup.sh +0 -4
- package/examples/cordova/scripts/android.sh +0 -8
- package/examples/cordova/scripts/ios.sh +0 -8
- package/examples/cordova/scripts/setup.sh +0 -5
- package/examples/ionic/scripts/android.sh +0 -8
- package/examples/ionic/scripts/ios.sh +0 -8
- package/examples/ionic/scripts/setup.sh +0 -5
- package/examples/react-native/scripts/android.sh +0 -8
- package/examples/react-native/scripts/ios.sh +0 -8
- package/examples/react-native/scripts/setup.sh +0 -8
- package/www/capacitor/customization/customization.js +0 -66
- package/www/capacitor/customization/customization_colors.js +0 -233
- package/www/capacitor/customization/customization_fonts.js +0 -106
- package/www/capacitor/customization/customization_images.js +0 -129
- package/www/capacitor/customization/font.js +0 -29
- package/www/capacitor/detect_faces/detect_face_result.js +0 -38
- package/www/capacitor/detect_faces/detect_faces_attribute.js +0 -15
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +0 -20
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +0 -23
- package/www/capacitor/detect_faces/detect_faces_config.js +0 -14
- package/www/capacitor/detect_faces/detect_faces_exception.js +0 -30
- package/www/capacitor/detect_faces/detect_faces_request.js +0 -67
- package/www/capacitor/detect_faces/detect_faces_response.js +0 -24
- package/www/capacitor/detect_faces/detect_faces_scenario.js +0 -10
- package/www/capacitor/face_capture/face_capture_config.js +0 -28
- package/www/capacitor/face_capture/face_capture_exception.js +0 -25
- package/www/capacitor/face_capture/face_capture_image.js +0 -26
- package/www/capacitor/face_capture/face_capture_response.js +0 -17
- package/www/capacitor/image_params/output_image_crop.js +0 -21
- package/www/capacitor/image_params/output_image_params.js +0 -9
- package/www/capacitor/image_params/point.js +0 -14
- package/www/capacitor/image_params/rect.js +0 -18
- package/www/capacitor/image_params/size.js +0 -9
- package/www/capacitor/image_quality/image_quality_characteristic.js +0 -24
- package/www/capacitor/image_quality/image_quality_characteristic_name.js +0 -58
- package/www/capacitor/image_quality/image_quality_group.js +0 -332
- package/www/capacitor/image_quality/image_quality_range.js +0 -26
- package/www/capacitor/image_quality/image_quality_result.js +0 -40
- package/www/capacitor/init/face_sdk_version.js +0 -16
- package/www/capacitor/match_faces/compared_face.js +0 -21
- package/www/capacitor/match_faces/compared_faces_pair.js +0 -23
- package/www/capacitor/match_faces/compared_faces_split.js +0 -22
- package/www/capacitor/match_faces/match_faces_backend_exception.js +0 -14
- package/www/capacitor/match_faces/match_faces_config.js +0 -12
- package/www/capacitor/match_faces/match_faces_detection.js +0 -25
- package/www/capacitor/match_faces/match_faces_detection_face.js +0 -28
- package/www/capacitor/match_faces/match_faces_exception.js +0 -30
- package/www/capacitor/match_faces/match_faces_image.js +0 -25
- package/www/capacitor/match_faces/match_faces_request.js +0 -13
- package/www/capacitor/match_faces/match_faces_response.js +0 -28
- package/www/capacitor/person_database/edit_group_persons_request.js +0 -9
- package/www/capacitor/person_database/image_upload.js +0 -16
- package/www/capacitor/person_database/pageable_item_list.js +0 -22
- package/www/capacitor/person_database/person.js +0 -22
- package/www/capacitor/person_database/person_database.js +0 -145
- package/www/capacitor/person_database/person_group.js +0 -18
- package/www/capacitor/person_database/person_image.js +0 -22
- package/www/capacitor/person_database/search_person.js +0 -31
- package/www/capacitor/person_database/search_person_detection.js +0 -22
- package/www/capacitor/person_database/search_person_image.js +0 -26
- package/www/capacitor/person_database/search_person_request.js +0 -17
- package/www/react-native/customization/customization.js +0 -66
- package/www/react-native/customization/customization_colors.js +0 -233
- package/www/react-native/customization/customization_fonts.js +0 -106
- package/www/react-native/customization/customization_images.js +0 -129
- package/www/react-native/customization/font.js +0 -29
- package/www/react-native/detect_faces/detect_face_result.js +0 -38
- package/www/react-native/detect_faces/detect_faces_attribute.js +0 -15
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +0 -20
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +0 -23
- package/www/react-native/detect_faces/detect_faces_config.js +0 -14
- package/www/react-native/detect_faces/detect_faces_exception.js +0 -30
- package/www/react-native/detect_faces/detect_faces_request.js +0 -67
- package/www/react-native/detect_faces/detect_faces_response.js +0 -24
- package/www/react-native/detect_faces/detect_faces_scenario.js +0 -10
- package/www/react-native/face_capture/face_capture_config.js +0 -28
- package/www/react-native/face_capture/face_capture_exception.js +0 -25
- package/www/react-native/face_capture/face_capture_image.js +0 -26
- package/www/react-native/face_capture/face_capture_response.js +0 -17
- package/www/react-native/image_params/output_image_crop.js +0 -21
- package/www/react-native/image_params/output_image_params.js +0 -9
- package/www/react-native/image_params/point.js +0 -14
- package/www/react-native/image_params/rect.js +0 -18
- package/www/react-native/image_params/size.js +0 -9
- package/www/react-native/image_quality/image_quality_characteristic.js +0 -24
- package/www/react-native/image_quality/image_quality_characteristic_name.js +0 -58
- package/www/react-native/image_quality/image_quality_group.js +0 -332
- package/www/react-native/image_quality/image_quality_range.js +0 -26
- package/www/react-native/image_quality/image_quality_result.js +0 -40
- package/www/react-native/init/face_sdk_version.js +0 -16
- package/www/react-native/match_faces/compared_face.js +0 -21
- package/www/react-native/match_faces/compared_faces_pair.js +0 -23
- package/www/react-native/match_faces/compared_faces_split.js +0 -22
- package/www/react-native/match_faces/match_faces_backend_exception.js +0 -14
- package/www/react-native/match_faces/match_faces_config.js +0 -12
- package/www/react-native/match_faces/match_faces_detection.js +0 -25
- package/www/react-native/match_faces/match_faces_detection_face.js +0 -28
- package/www/react-native/match_faces/match_faces_exception.js +0 -30
- package/www/react-native/match_faces/match_faces_image.js +0 -25
- package/www/react-native/match_faces/match_faces_request.js +0 -13
- package/www/react-native/match_faces/match_faces_response.js +0 -28
- package/www/react-native/person_database/edit_group_persons_request.js +0 -9
- package/www/react-native/person_database/image_upload.js +0 -16
- package/www/react-native/person_database/pageable_item_list.js +0 -22
- package/www/react-native/person_database/person.js +0 -22
- package/www/react-native/person_database/person_database.js +0 -145
- package/www/react-native/person_database/person_group.js +0 -18
- package/www/react-native/person_database/person_image.js +0 -22
- package/www/react-native/person_database/search_person.js +0 -31
- package/www/react-native/person_database/search_person_detection.js +0 -22
- package/www/react-native/person_database/search_person_image.js +0 -26
- package/www/react-native/person_database/search_person_request.js +0 -17
- package/www/types/customization/customization.d.ts +0 -46
- package/www/types/customization/customization_colors.d.ts +0 -37
- package/www/types/customization/customization_fonts.d.ts +0 -23
- package/www/types/customization/customization_images.d.ts +0 -24
- package/www/types/customization/font.d.ts +0 -41
- package/www/types/detect_faces/detect_face_result.d.ts +0 -16
- package/www/types/detect_faces/detect_faces_attribute.d.ts +0 -15
- package/www/types/detect_faces/detect_faces_attribute_result.d.ts +0 -11
- package/www/types/detect_faces/detect_faces_backend_exception.d.ts +0 -15
- package/www/types/detect_faces/detect_faces_config.d.ts +0 -37
- package/www/types/detect_faces/detect_faces_exception.d.ts +0 -24
- package/www/types/detect_faces/detect_faces_request.d.ts +0 -80
- package/www/types/detect_faces/detect_faces_response.d.ts +0 -12
- package/www/types/detect_faces/detect_faces_scenario.d.ts +0 -10
- package/www/types/face_capture/face_capture_config.d.ts +0 -39
- package/www/types/face_capture/face_capture_exception.d.ts +0 -17
- package/www/types/face_capture/face_capture_image.d.ts +0 -39
- package/www/types/face_capture/face_capture_response.d.ts +0 -9
- package/www/types/image_params/output_image_crop.d.ts +0 -49
- package/www/types/image_params/output_image_params.d.ts +0 -28
- package/www/types/image_params/point.d.ts +0 -9
- package/www/types/image_params/rect.d.ts +0 -8
- package/www/types/image_params/size.d.ts +0 -6
- package/www/types/image_quality/image_quality_characteristic.d.ts +0 -7
- package/www/types/image_quality/image_quality_characteristic_name.d.ts +0 -61
- package/www/types/image_quality/image_quality_group.d.ts +0 -418
- package/www/types/image_quality/image_quality_range.d.ts +0 -8
- package/www/types/image_quality/image_quality_result.d.ts +0 -30
- package/www/types/init/face_sdk_version.d.ts +0 -16
- package/www/types/match_faces/compared_face.d.ts +0 -29
- package/www/types/match_faces/compared_faces_pair.d.ts +0 -36
- package/www/types/match_faces/compared_faces_split.d.ts +0 -8
- package/www/types/match_faces/match_faces_backend_exception.d.ts +0 -6
- package/www/types/match_faces/match_faces_config.d.ts +0 -14
- package/www/types/match_faces/match_faces_detection.d.ts +0 -30
- package/www/types/match_faces/match_faces_detection_face.d.ts +0 -43
- package/www/types/match_faces/match_faces_exception.d.ts +0 -21
- package/www/types/match_faces/match_faces_image.d.ts +0 -34
- package/www/types/match_faces/match_faces_request.d.ts +0 -34
- package/www/types/match_faces/match_faces_response.d.ts +0 -27
- package/www/types/person_database/edit_group_persons_request.d.ts +0 -8
- package/www/types/person_database/image_upload.d.ts +0 -20
- package/www/types/person_database/pageable_item_list.d.ts +0 -7
- package/www/types/person_database/person.d.ts +0 -33
- package/www/types/person_database/person_database.d.ts +0 -95
- package/www/types/person_database/person_group.d.ts +0 -22
- package/www/types/person_database/person_image.d.ts +0 -10
- package/www/types/person_database/search_person.d.ts +0 -31
- package/www/types/person_database/search_person_detection.d.ts +0 -11
- package/www/types/person_database/search_person_image.d.ts +0 -25
- package/www/types/person_database/search_person_request.d.ts +0 -39
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
import { ImageQualityCharacteristic } from './image_quality_characteristic'
|
|
2
|
-
import { ImageQualityRange } from './image_quality_range'
|
|
3
|
-
|
|
4
|
-
export class _Image {
|
|
5
|
-
imageWidth(range) {
|
|
6
|
-
return ImageQualityCharacteristic._create(
|
|
7
|
-
ImageQualityCharacteristicName.IMAGE_WIDTH,
|
|
8
|
-
{ recommended: range }
|
|
9
|
-
)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
imageHeight(range) {
|
|
13
|
-
return ImageQualityCharacteristic._create(
|
|
14
|
-
ImageQualityCharacteristicName.IMAGE_HEIGHT,
|
|
15
|
-
{ recommended: range }
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
imageWidthToHeight(range) {
|
|
20
|
-
return ImageQualityCharacteristic._create(
|
|
21
|
-
ImageQualityCharacteristicName.IMAGE_WIDTH_TO_HEIGHT,
|
|
22
|
-
{ recommended: range }
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
imageChannelsNumber(channelsNumber) {
|
|
27
|
-
return ImageQualityCharacteristic._create(
|
|
28
|
-
ImageQualityCharacteristicName.IMAGE_CHANNELS_NUMBER,
|
|
29
|
-
{ recommended: ImageQualityRange.withValue(channelsNumber) }
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
paddingRatio(range) {
|
|
34
|
-
return ImageQualityCharacteristic._create(
|
|
35
|
-
ImageQualityCharacteristicName.PADDING_RATIO,
|
|
36
|
-
{ recommended: range }
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
artFace() {
|
|
41
|
-
return ImageQualityCharacteristic._create(
|
|
42
|
-
ImageQualityCharacteristicName.ART_FACE,
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
allRecommended() {
|
|
47
|
-
return [this.artFace()]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export class _HeadSizeAndPosition {
|
|
52
|
-
faceMidPointHorizontalPosition() {
|
|
53
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FACE_MID_POINT_HORIZONTAL_POSITION)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
faceMidPointVerticalPosition() {
|
|
57
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FACE_MID_POINT_VERTICAL_POSITION)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
headWidthRatio() {
|
|
61
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.HEAD_WIDTH_RATIO)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
headHeightRatio() {
|
|
65
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.HEAD_HEIGHT_RATIO)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
eyesDistance() {
|
|
69
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYES_DISTANCE)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
yaw() {
|
|
73
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.YAW)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
pitch() {
|
|
77
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.PITCH)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
roll() {
|
|
81
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.ROLL)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
allRecommended() {
|
|
85
|
-
return [
|
|
86
|
-
this.faceMidPointHorizontalPosition(),
|
|
87
|
-
this.faceMidPointVerticalPosition(),
|
|
88
|
-
this.headHeightRatio(),
|
|
89
|
-
this.headWidthRatio(),
|
|
90
|
-
this.eyesDistance(),
|
|
91
|
-
this.yaw(),
|
|
92
|
-
this.pitch(),
|
|
93
|
-
this.roll(),
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export class _FaceImage {
|
|
99
|
-
blurLevel() {
|
|
100
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.BLUR_LEVEL)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
noiseLevel() {
|
|
104
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.NOISE_LEVEL)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
unnaturalSkinTone() {
|
|
108
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.UNNATURAL_SKIN_TONE)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
faceDynamicRange() {
|
|
112
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FACE_DYNAMIC_RANGE)
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
allRecommended() {
|
|
116
|
-
return [
|
|
117
|
-
this.blurLevel(),
|
|
118
|
-
this.noiseLevel(),
|
|
119
|
-
this.unnaturalSkinTone(),
|
|
120
|
-
this.faceDynamicRange(),
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export class _Eyes {
|
|
126
|
-
eyeRightClosed() {
|
|
127
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_RIGHT_CLOSED)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
eyeLeftClosed() {
|
|
131
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_LEFT_CLOSED)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
eyeRightOccluded() {
|
|
135
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_RIGHT_OCCLUDED)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
eyeLeftOccluded() {
|
|
139
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_LEFT_OCCLUDED)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
eyesRed() {
|
|
143
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYES_RED)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
eyeRightCoveredWithHair() {
|
|
147
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_RIGHT_COVERED_WITH_HAIR)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
eyeLeftCoveredWithHair() {
|
|
151
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EYE_LEFT_COVERED_WITH_HAIR)
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
offGaze() {
|
|
155
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.OFF_GAZE)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
allRecommended() {
|
|
159
|
-
return [
|
|
160
|
-
this.eyeRightClosed(),
|
|
161
|
-
this.eyeLeftClosed(),
|
|
162
|
-
this.eyeRightOccluded(),
|
|
163
|
-
this.eyeLeftOccluded(),
|
|
164
|
-
this.eyesRed(),
|
|
165
|
-
this.eyeRightCoveredWithHair(),
|
|
166
|
-
this.eyeLeftCoveredWithHair(),
|
|
167
|
-
this.offGaze(),
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export class _ShadowsAndLightning {
|
|
173
|
-
tooDark() {
|
|
174
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.TOO_DARK)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
tooLight() {
|
|
178
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.TOO_LIGHT)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
faceGlare() {
|
|
182
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FACE_GLARE)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
shadowsOnFace() {
|
|
186
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.SHADOWS_ON_FACE)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
allRecommended() {
|
|
190
|
-
return [
|
|
191
|
-
this.tooDark(),
|
|
192
|
-
this.tooLight(),
|
|
193
|
-
this.faceGlare(),
|
|
194
|
-
this.shadowsOnFace(),
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export class _PoseAndExpression {
|
|
200
|
-
shouldersPose() {
|
|
201
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.SHOULDERS_POSE)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
expressionLevel() {
|
|
205
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.EXPRESSION_LEVEL)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
mouthOpen() {
|
|
209
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.MOUTH_OPEN)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
smile() {
|
|
213
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.SMILE)
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
allRecommended() {
|
|
217
|
-
return [
|
|
218
|
-
this.shouldersPose(),
|
|
219
|
-
this.expressionLevel(),
|
|
220
|
-
this.mouthOpen(),
|
|
221
|
-
this.smile(),
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export class _HeadOcclusion {
|
|
227
|
-
darkGlasses() {
|
|
228
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.DARK_GLASSES)
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
reflectionOnGlasses() {
|
|
232
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.REFLECTION_ON_GLASSES)
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
framesTooHeavy() {
|
|
236
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FRAMES_TOO_HEAVY)
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
faceOccluded() {
|
|
240
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FACE_OCCLUDED)
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
headCovering() {
|
|
244
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.HEAD_COVERING)
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
foreheadCovering() {
|
|
248
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.FOREHEAD_COVERING)
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
strongMakeup() {
|
|
252
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.STRONG_MAKEUP)
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
headphones() {
|
|
256
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.HEAD_PHONES)
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
medicalMask() {
|
|
260
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.MEDICAL_MASK)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
allRecommended() {
|
|
264
|
-
return [
|
|
265
|
-
this.darkGlasses(),
|
|
266
|
-
this.reflectionOnGlasses(),
|
|
267
|
-
this.framesTooHeavy(),
|
|
268
|
-
this.faceOccluded(),
|
|
269
|
-
this.headCovering(),
|
|
270
|
-
this.foreheadCovering(),
|
|
271
|
-
this.strongMakeup(),
|
|
272
|
-
this.headphones(),
|
|
273
|
-
this.medicalMask(),
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export class _Background {
|
|
279
|
-
backgroundUniformity() {
|
|
280
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.BACKGROUND_UNIFORMITY)
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
shadowsOnBackground() {
|
|
284
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.SHADOWS_ON_BACKGROUND)
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
otherFaces() {
|
|
288
|
-
return ImageQualityCharacteristic._create(ImageQualityCharacteristicName.OTHER_FACES)
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
backgroundColorMatch(params) {
|
|
292
|
-
return ImageQualityCharacteristic._create(
|
|
293
|
-
ImageQualityCharacteristicName.BACKGROUND_COLOR_MATCH,
|
|
294
|
-
{ color: params?.color }
|
|
295
|
-
)
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
allRecommended() {
|
|
299
|
-
return [
|
|
300
|
-
this.backgroundUniformity(),
|
|
301
|
-
this.shadowsOnBackground(),
|
|
302
|
-
this.otherFaces(),
|
|
303
|
-
this.backgroundColorMatch(),
|
|
304
|
-
]
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export class ImageQualityGroup {
|
|
309
|
-
static get image() { return ImageQualityGroup._image }
|
|
310
|
-
static _image = new _Image()
|
|
311
|
-
|
|
312
|
-
static get headSizeAndPosition() { return ImageQualityGroup._headSizeAndPosition }
|
|
313
|
-
static _headSizeAndPosition = new _HeadSizeAndPosition()
|
|
314
|
-
|
|
315
|
-
static get faceImage() { return ImageQualityGroup._faceImage }
|
|
316
|
-
static _faceImage = new _FaceImage()
|
|
317
|
-
|
|
318
|
-
static get eyes() { return ImageQualityGroup._eyes }
|
|
319
|
-
static _eyes = new _Eyes()
|
|
320
|
-
|
|
321
|
-
static get shadowsAndLightning() { return ImageQualityGroup._shadowsAndLightning }
|
|
322
|
-
static _shadowsAndLightning = new _ShadowsAndLightning()
|
|
323
|
-
|
|
324
|
-
static get poseAndExpression() { return ImageQualityGroup._poseAndExpression }
|
|
325
|
-
static _poseAndExpression = new _PoseAndExpression()
|
|
326
|
-
|
|
327
|
-
static get headOcclusion() { return ImageQualityGroup._headOcclusion }
|
|
328
|
-
static _headOcclusion = new _HeadOcclusion()
|
|
329
|
-
|
|
330
|
-
static get background() { return ImageQualityGroup._background }
|
|
331
|
-
static _background = new _Background()
|
|
332
|
-
}
|