@regulaforensics/face-sdk 6.3.93-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.
Files changed (42) hide show
  1. package/examples/capacitor/package.json +1 -1
  2. package/examples/cordova/package.json +1 -1
  3. package/examples/ionic/package.json +1 -1
  4. package/examples/react-native/package.json +1 -1
  5. package/package.json +1 -1
  6. package/plugin.xml +1 -1
  7. package/www/types/customization/camera_position.d.ts +9 -0
  8. package/www/types/customization/customization.d.ts +19 -0
  9. package/www/types/customization/customization_colors.d.ts +6 -0
  10. package/www/types/customization/customization_fonts.d.ts +6 -0
  11. package/www/types/customization/customization_images.d.ts +6 -0
  12. package/www/types/customization/font.d.ts +17 -0
  13. package/www/types/detect_faces/detect_faces_config.d.ts +18 -0
  14. package/www/types/detect_faces/detect_faces_exception.d.ts +3 -0
  15. package/www/types/detect_faces/detect_faces_request.d.ts +53 -0
  16. package/www/types/face_capture/face_capture_config.d.ts +9 -0
  17. package/www/types/face_capture/face_capture_image.d.ts +24 -0
  18. package/www/types/image_params/output_image_crop.d.ts +24 -0
  19. package/www/types/image_params/output_image_params.d.ts +15 -0
  20. package/www/types/image_params/point.d.ts +3 -0
  21. package/www/types/image_quality/image_quality_characteristic.d.ts +3 -0
  22. package/www/types/image_quality/image_quality_characteristic_name.d.ts +3 -0
  23. package/www/types/image_quality/image_quality_group.d.ts +263 -0
  24. package/www/types/init/face_sdk_version.d.ts +9 -0
  25. package/www/types/init/init_config.d.ts +9 -0
  26. package/www/types/liveness/liveness_config.d.ts +66 -0
  27. package/www/types/liveness/liveness_notification.d.ts +3 -0
  28. package/www/types/liveness/liveness_response.d.ts +24 -0
  29. package/www/types/match_faces/compared_face.d.ts +18 -0
  30. package/www/types/match_faces/compared_faces_pair.d.ts +24 -0
  31. package/www/types/match_faces/match_faces_detection.d.ts +18 -0
  32. package/www/types/match_faces/match_faces_detection_face.d.ts +30 -0
  33. package/www/types/match_faces/match_faces_image.d.ts +18 -0
  34. package/www/types/match_faces/match_faces_request.d.ts +16 -0
  35. package/www/types/match_faces/match_faces_response.d.ts +15 -0
  36. package/www/types/person_database/image_upload.d.ts +14 -0
  37. package/www/types/person_database/person.d.ts +23 -0
  38. package/www/types/person_database/person_database.d.ts +3 -0
  39. package/www/types/person_database/person_group.d.ts +14 -0
  40. package/www/types/person_database/search_person.d.ts +16 -0
  41. package/www/types/person_database/search_person_image.d.ts +13 -0
  42. package/www/types/person_database/search_person_request.d.ts +24 -0
@@ -1,154 +1,417 @@
1
1
  import { ImageQualityCharacteristic } from './image_quality_characteristic'
2
2
  import { ImageQualityRange } from './image_quality_range'
3
3
 
4
+ /**
5
+ * Image Quality characteristic group
6
+ */
4
7
  export class ImageQualityGroup {
8
+ /**
9
+ * The Image characteristics group includes width, height, width to height proportions,
10
+ * the image RGB channels number, and padding ratio.
11
+ */
5
12
  static get image(): _Image
13
+ /**
14
+ * The Head size and position group includes the position of the "middle point"
15
+ * relative to the width and height of the image, the head width to the image
16
+ * width and height ratio, inter-eye distance, yaw, pitch, roll.
17
+ */
6
18
  static get headSizeAndPosition(): _HeadSizeAndPosition
19
+ /**
20
+ * The Face image quality group includes blur and noise levels, unnatural skin tone,
21
+ * and face dynamic range checks.
22
+ */
7
23
  static get faceImage(): _FaceImage
24
+ /**
25
+ * The Eyes characteristics group checks eyes closure, occlusion, hair coverage,
26
+ * red eye effect, and whether a person is looking directly at the camera.
27
+ */
8
28
  static get eyes(): _Eyes
29
+ /**
30
+ * The Shadows and lightning characteristics group checks whether a photo
31
+ * is too dark or overexposed, if there are glares or shadows on the face.
32
+ */
9
33
  static get shadowsAndLightning(): _ShadowsAndLightning
34
+ /**
35
+ * The Pose and expression characteristics group checks the shoulders pose,
36
+ * face expression, whether there is an open mouth or smile.
37
+ */
10
38
  static get poseAndExpression(): _PoseAndExpression
39
+ /**
40
+ * The Head occlusion group includes checks of glasses, face occlusion, and head coverage.
41
+ */
11
42
  static get headOcclusion(): _HeadOcclusion
43
+ /**
44
+ * The Background characteristics group checks the background uniformity,
45
+ * shadows on background, and other faces presence on the picture.
46
+ */
12
47
  static get background(): _Background
13
48
  }
14
49
 
15
50
  export class _Image {
51
+ /**
52
+ * The image width, pixels.
53
+ * Doesn't have recommended value.
54
+ */
16
55
  imageWidth(range: ImageQualityRange): ImageQualityCharacteristic
17
56
 
57
+ /**
58
+ * The image height, pixels.
59
+ * Doesn't have recommended value.
60
+ */
18
61
  imageHeight(range: ImageQualityRange): ImageQualityCharacteristic
19
62
 
63
+ /**
64
+ * The image width to height proportion.
65
+ * Doesn't have recommended value.
66
+ */
20
67
  imageWidthToHeight(range: ImageQualityRange): ImageQualityCharacteristic
21
68
 
69
+ /**
70
+ * The image RGB channels number.
71
+ * Doesn't have recommended value.
72
+ *
73
+ * @param channelsNumber - 3 is for RGB images.
74
+ */
22
75
  imageChannelsNumber(channelsNumber: number): ImageQualityCharacteristic
23
76
 
77
+ /**
78
+ * The percentage of the area of the image that was "padded" during alignment.
79
+ * The characteristic is needed to determine if the head goes beyond the image.
80
+ * The range is from 0 to 1 where 0 is 0% of the image is "padded".
81
+ * Doesn't have recommended value.
82
+ */
24
83
  paddingRatio(range: ImageQualityRange): ImageQualityCharacteristic
25
84
 
85
+ /**
86
+ * Whether the face in the image is a photo, not a drawing, sculpture, cartoon, etc.
87
+ * If the returned value is out of the recommended range, the image is not a photo.
88
+ * The range is from 0 to 1 where 0 means the image is a photo.
89
+ */
26
90
  artFace(): ImageQualityCharacteristic
27
91
 
92
+ /**
93
+ * All Group characteristics with default (recommended) values.
94
+ * Doesn't include characteristics without default values.
95
+ */
28
96
  allRecommended(): Array<ImageQualityCharacteristic>
29
97
 
30
98
  private constructor()
31
99
  }
32
100
 
33
101
  export class _HeadSizeAndPosition {
102
+ /**
103
+ * The position of the "middle point" (the middle of the line connecting the eye centers)
104
+ * relative to the width of the image.
105
+ * The range is from 0 to 1 where range [0.5, 0.5] is for "middle point" strictly in the center .
106
+ */
34
107
  faceMidPointHorizontalPosition(): ImageQualityCharacteristic
35
108
 
109
+ /**
110
+ * The position of the "middle point" (the middle of the line connecting the eye centers)
111
+ * relative to the height of the image.
112
+ * The range is from 0 to 1 where range [0.5, 0.5] is for "middle point" strictly in the center .
113
+ */
36
114
  faceMidPointVerticalPosition(): ImageQualityCharacteristic
37
115
 
116
+ /**
117
+ * The head width to the image width ratio.
118
+ * The range is from 0 to 1.
119
+ */
38
120
  headWidthRatio(): ImageQualityCharacteristic
39
121
 
122
+ /**
123
+ * The head height to the image height ratio.
124
+ * The range is from 0 to 1.
125
+ */
40
126
  headHeightRatio(): ImageQualityCharacteristic
41
127
 
128
+ /**
129
+ * Inter-eye distance — the length of the line connecting the eye centers of the left and right eye, pixels.
130
+ */
42
131
  eyesDistance(): ImageQualityCharacteristic
43
132
 
133
+ /**
134
+ * The yaw of the head, degrees.
135
+ * The range is from -90 to 90. Range value [0, 0] for strictly stright head position.
136
+ */
44
137
  yaw(): ImageQualityCharacteristic
45
138
 
139
+ /**
140
+ * The pitch of the head, degrees.
141
+ * The range is from -90 to 90. Range value [0, 0] for strictly stright head position.
142
+ */
46
143
  pitch(): ImageQualityCharacteristic
47
144
 
145
+ /**
146
+ * The roll of the head, degrees.
147
+ * The range is from -90 to 90. Range value [0, 0] for strictly stright head position.
148
+ */
48
149
  roll(): ImageQualityCharacteristic
49
150
 
151
+ /**
152
+ * All Group characteristics with default (recommended) values.
153
+ * Doesn't include characteristics without default values.
154
+ */
50
155
  allRecommended(): Array<ImageQualityCharacteristic>
51
156
 
52
157
  private constructor()
53
158
  }
54
159
 
55
160
  export class _FaceImage {
161
+ /**
162
+ * The blur level.
163
+ * The range is from 0 to 1 where 0 is the absence of blur effect
164
+ */
56
165
  blurLevel(): ImageQualityCharacteristic
57
166
 
167
+ /**
168
+ * The noise level.
169
+ * The range is from 0 to 1 where 0 is minimal noise level.
170
+ */
58
171
  noiseLevel(): ImageQualityCharacteristic
59
172
 
173
+ /**
174
+ * The true-colour representation of the skin colour.
175
+ * The range is from 0 to 1.
176
+ */
60
177
  unnaturalSkinTone(): ImageQualityCharacteristic
61
178
 
179
+ /**
180
+ * The range of tonal difference between the lightest light and darkest dark of an image, bits.
181
+ */
62
182
  faceDynamicRange(): ImageQualityCharacteristic
63
183
 
184
+ /**
185
+ * All Group characteristics with default (recommended) values.
186
+ * Doesn't include characteristics without default values.
187
+ */
64
188
  allRecommended(): Array<ImageQualityCharacteristic>
65
189
 
66
190
  private constructor()
67
191
  }
68
192
 
69
193
  export class _Eyes {
194
+ /**
195
+ * Whether the right eye is closed.
196
+ * The range is from 0 to 1 where 1 is the eye is fully closed.
197
+ */
70
198
  eyeRightClosed(): ImageQualityCharacteristic
71
199
 
200
+ /**
201
+ * Whether the left eye is closed.
202
+ * The range is from 0 to 1 where 1 is the eye is fully closed.
203
+ */
72
204
  eyeLeftClosed(): ImageQualityCharacteristic
73
205
 
206
+ /**
207
+ * Whether the right eye is occluded.
208
+ * The range is from 0 to 1 where 1 is the eye is fully occluded.
209
+ */
74
210
  eyeRightOccluded(): ImageQualityCharacteristic
75
211
 
212
+ /**
213
+ * Whether the left eye is occluded.
214
+ * The range is from 0 to 1 where 1 is the eye is fully occluded.
215
+ */
76
216
  eyeLeftOccluded(): ImageQualityCharacteristic
77
217
 
218
+ /**
219
+ * Whether there is the red-eye effect.
220
+ * The range is from 0 to 1 where 0 is the absence of red-eye effect.
221
+ */
78
222
  eyesRed(): ImageQualityCharacteristic
79
223
 
224
+ /**
225
+ * Whether the right eye is covered with hair.
226
+ * The range is from 0 to 1 where 1 is 100% of the eye is covered by hair.
227
+ */
80
228
  eyeRightCoveredWithHair(): ImageQualityCharacteristic
81
229
 
230
+ /**
231
+ * Whether the left eye is covered with hair.
232
+ * The range is from 0 to 1 where 1 is 100% of the eye is covered by hair.
233
+ */
82
234
  eyeLeftCoveredWithHair(): ImageQualityCharacteristic
83
235
 
236
+ /**
237
+ * Whether the person is not looking directly at the camera.
238
+ * The range is from 0 to 1 where 0 is for absolutely direct look.
239
+ */
84
240
  offGaze(): ImageQualityCharacteristic
85
241
 
242
+ /**
243
+ * All Group characteristics with default (recommended) values.
244
+ * Doesn't include characteristics without default values.
245
+ */
86
246
  allRecommended(): Array<ImageQualityCharacteristic>
87
247
 
88
248
  private constructor()
89
249
  }
90
250
 
91
251
  export class _ShadowsAndLightning {
252
+ /**
253
+ * Whether the photo is too dark.
254
+ * The range is from 0 to 1.
255
+ */
92
256
  tooDark(): ImageQualityCharacteristic
93
257
 
258
+ /**
259
+ * Whether the photo is overexposed.
260
+ * The range is from 0 to 1.
261
+ */
94
262
  tooLight(): ImageQualityCharacteristic
95
263
 
264
+ /**
265
+ * Whether there is glare on the face.
266
+ * The range is from 0 to 1 where 0 is the absence of glare.
267
+ */
96
268
  faceGlare(): ImageQualityCharacteristic
97
269
 
270
+ /**
271
+ * Whether there are shadows on the face.
272
+ * The range is from 0 to 1 where 0 is the absence of shadows on the face.
273
+ */
98
274
  shadowsOnFace(): ImageQualityCharacteristic
99
275
 
276
+ /**
277
+ * All Group characteristics with default (recommended) values.
278
+ * Doesn't include characteristics without default values.
279
+ */
100
280
  allRecommended(): Array<ImageQualityCharacteristic>
101
281
 
102
282
  private constructor()
103
283
  }
104
284
 
105
285
  export class _PoseAndExpression {
286
+ /**
287
+ * Checks the symmetry of the shoulders.
288
+ * The range is from 0 to 1 where 1 is for absolutely symmetrical shoulders.
289
+ */
106
290
  shouldersPose(): ImageQualityCharacteristic
107
291
 
292
+ /**
293
+ * Checks the presence of any emotional facial expression.
294
+ * The range is from 0 to 1 where 0 is for absolutely non-emotional expression.
295
+ */
108
296
  expressionLevel(): ImageQualityCharacteristic
109
297
 
298
+ /**
299
+ * Whether the mouth is open.
300
+ * The range is from 0 to 1 where 0 is closed mouth.
301
+ */
110
302
  mouthOpen(): ImageQualityCharacteristic
111
303
 
304
+ /**
305
+ * Whether the person smiles.
306
+ * The range is from 0 to 1 where 0 is smile absence.
307
+ */
112
308
  smile(): ImageQualityCharacteristic
113
309
 
310
+ /**
311
+ * All Group characteristics with default (recommended) values.
312
+ * Doesn't include characteristics without default values.
313
+ */
114
314
  allRecommended(): Array<ImageQualityCharacteristic>
115
315
 
116
316
  private constructor()
117
317
  }
118
318
 
119
319
  export class _HeadOcclusion {
320
+ /**
321
+ * Whether the person wears dark glasses.
322
+ * The range is from 0 to 1 where 0 is dark glasses absence.
323
+ */
120
324
  darkGlasses(): ImageQualityCharacteristic
121
325
 
326
+ /**
327
+ * Whether there are reflections on glasses.
328
+ * The range is from 0 to 1 where 0 is reflections absence.
329
+ * In the current release, always succeeds. Will be developed in the coming releases.
330
+ */
122
331
  reflectionOnGlasses(): ImageQualityCharacteristic
123
332
 
333
+ /**
334
+ * Whether the glasses frames do not obscure eye details and the irises of both eyes are visible.
335
+ * The range is from 0 to 20 where 0 the absence of frames (glasses).
336
+ */
124
337
  framesTooHeavy(): ImageQualityCharacteristic
125
338
 
339
+ /**
340
+ * Whether the face is visible and not occluded.
341
+ * The range is from 0 to 1 where 0 is face occlusion absence.
342
+ */
126
343
  faceOccluded(): ImageQualityCharacteristic
127
344
 
345
+ /**
346
+ * Whether there is any head coverage other than religious headwear.
347
+ * The range is from 0 to 1.
348
+ */
128
349
  headCovering(): ImageQualityCharacteristic
129
350
 
351
+ /**
352
+ * Whether the forehead is covered.
353
+ * The range is from 0 to 1.
354
+ */
130
355
  foreheadCovering(): ImageQualityCharacteristic
131
356
 
357
+ /**
358
+ * Whether the makeup is too strong.
359
+ * In the current release, always succeeds. Will be developed in the coming releases.
360
+ * The range is from 0 to 1.
361
+ */
132
362
  strongMakeup(): ImageQualityCharacteristic
133
363
 
364
+ /**
365
+ * Whether the person is wearing headphones.
366
+ * The range is from 0 to 1 where 0 is headphones absence.
367
+ */
134
368
  headphones(): ImageQualityCharacteristic
135
369
 
370
+ /**
371
+ * Whether the person is wearing a medical mask.
372
+ * The range is from 0 to 1 where 0 is medical mask absence.
373
+ */
136
374
  medicalMask(): ImageQualityCharacteristic
137
375
 
376
+ /**
377
+ * All Group characteristics with default (recommended) values.
378
+ * Doesn't include characteristics without default values.
379
+ */
138
380
  allRecommended(): Array<ImageQualityCharacteristic>
139
381
 
140
382
  private constructor()
141
383
  }
142
384
 
143
385
  export class _Background {
386
+ /**
387
+ * Checks uniformity of the portrait background.
388
+ * The range is from 0 to 1 where 1 is absolute background uniformity.
389
+ */
144
390
  backgroundUniformity(): ImageQualityCharacteristic
145
391
 
392
+ /**
393
+ * Whether there are shadows on the portrait background.
394
+ * The range is from 0 to 1 where 1 is the absence of shadows on the portrait background.
395
+ */
146
396
  shadowsOnBackground(): ImageQualityCharacteristic
147
397
 
398
+ /**
399
+ * The number of faces on the photo.
400
+ * The range is from 0 to 1 where 1 is full background color match.
401
+ */
148
402
  otherFaces(): ImageQualityCharacteristic
149
403
 
404
+ /**
405
+ * Whether the background color matches default background color.
406
+ * Default color is white (RGB(255,255,255) or hex #FFFFFF)
407
+ * The range is from 0 to 1 where 1 is full background color match.
408
+ */
150
409
  backgroundColorMatch(params?: { color?: number }): ImageQualityCharacteristic
151
410
 
411
+ /**
412
+ * Whether the background color matches the required color.
413
+ * The range is from 0 to 1 where 1 is full background color match.
414
+ */
152
415
  allRecommended(): Array<ImageQualityCharacteristic>
153
416
 
154
417
  private constructor()
@@ -1,6 +1,15 @@
1
1
  export class FaceSDKVersion {
2
+ /**
3
+ * Version of the API module.
4
+ */
2
5
  get api(): string | null
6
+ /**
7
+ * Version of the CORE module.
8
+ */
3
9
  get core(): string | null
10
+ /**
11
+ * CORE module variant.
12
+ */
4
13
  get coreMode(): string | null
5
14
 
6
15
  private constructor()
@@ -1,4 +1,13 @@
1
+ /**
2
+ * A configuration file for FaceSDK initialization.
3
+ * Allows to initialize using license binary.
4
+ * Also controls initialization time properties such as licenseUpdate.
5
+ */
1
6
  export class InitConfig {
7
+ /**
8
+ * @param license - The license binary file.
9
+ * @param params.licenseUpdate - Enables automatic license update check during {@link FaceSDK} initialization.
10
+ */
2
11
  constructor(
3
12
  license: string,
4
13
  params?: {
@@ -1,21 +1,87 @@
1
1
  import { CameraPosition } from '../customization/camera_position'
2
2
  import { ScreenOrientation } from '../customization/screen_orientation'
3
3
 
4
+ /**
5
+ * Configuration for the Liveness processing.
6
+ * The configuration provides convenient properties to change the behavior and the appearance of the Liveness UI module.
7
+ */
4
8
  export class LivenessConfig {
9
+ /**
10
+ * Defines, whether the logo is visible on the bottom of Liveness UI screens. Defaults to `true`.
11
+ */
5
12
  copyright: boolean
13
+
14
+ /**
15
+ * Defines, whether the camera's toolbar switch camera button is available on the Liveness UI. Defaults to `false`.
16
+ * When set to `true` the CameraToolbarView will contain a button to change current `cameraPosition`.
17
+ * Only for livenessType = {@link LivenessType.PASSIVE}.
18
+ */
6
19
  cameraSwitchEnabled: boolean
20
+
7
21
  closeButtonEnabled: boolean
22
+
23
+ /**
24
+ * Defines, whether the camera's toolbar torch button is available on the Liveness UI. Defaults to `true`.
25
+ * When set to `false` the CameraToolbarView won't contain a button to toggle camera's flashlight.
26
+ * Only for livenessType = {@link LivenessType.PASSIVE}.
27
+ */
8
28
  torchButtonEnabled: boolean
29
+
30
+ /**
31
+ * Enables vibration during Liveness processing. Defaults to `true`.
32
+ */
9
33
  vibrateOnSteps: boolean
34
+
35
+ /**
36
+ * Android only.
37
+ */
10
38
  cameraPositionAndroid?: number
39
+
40
+ /**
41
+ * IOS only.
42
+ */
11
43
  cameraPositionIOS: CameraPosition
44
+
45
+ /**
46
+ * Android only.
47
+ */
12
48
  screenOrientation?: Array<ScreenOrientation>
49
+
50
+ /**
51
+ * Defines whether the liveness request sends a location of a device. Defaults to `true`.
52
+ * When set to `true` the liveness request to web service will contain the `location`
53
+ * object within the json `metadata` object.
54
+ * The location is used only when permissions are granted and the location is available.
55
+ */
13
56
  locationTrackingEnabled: boolean
57
+
58
+ /**
59
+ * The number of attempts to pass the Liveness before completing with error. Defaults to `0`.
60
+ * When set to `0` the Liveness will always ask to retry on error.
61
+ */
14
62
  attemptsCount: number
63
+
64
+ /**
65
+ * Defines whether the liveness recording video of processing.
66
+ * Defaults to {@link RecordingProcess.ASYNCHRONOUS_UPLOAD}.
67
+ */
15
68
  recordingProcess: RecordingProcess
69
+
70
+ /**
71
+ * Defines whether the liveness processing type. Defaults to {@link LivenessType.ACTIVE}.
72
+ */
16
73
  livenessType: LivenessType
74
+
75
+ /**
76
+ * Defines tag that can be used in Liveness processing. Defaults to `null`.
77
+ */
17
78
  tag?: string
79
+
80
+ /**
81
+ * Defines which steps of the user interface can be omitted. See {@link LivenessSkipStep} enum for details.
82
+ */
18
83
  skipStep: Array<LivenessSkipStep>
84
+
19
85
  metadata?: Record<string, any>
20
86
 
21
87
  constructor(
@@ -7,6 +7,9 @@ export class LivenessNotification {
7
7
  private constructor()
8
8
  }
9
9
 
10
+ /**
11
+ * Liveness process statuses.
12
+ */
10
13
  export enum LivenessProcessStatus {
11
14
  START,
12
15
  PREPARING,
@@ -1,18 +1,42 @@
1
1
 
2
2
  import { LivenessException } from './liveness_exception'
3
3
 
4
+ /**
5
+ * The response from the Liveness module.
6
+ */
4
7
  export class LivenessResponse {
8
+ /**
9
+ * The input image used to determine the liveness.
10
+ */
5
11
  get image(): string | null
12
+
13
+ /**
14
+ * The status of the Liveness processing.
15
+ */
6
16
  get liveness(): LivenessStatus
17
+
7
18
  get tag(): string | null
8
19
  get transactionId(): string | null
9
20
  get estimatedAge(): number | null
21
+
22
+ /**
23
+ * The error describes a failed liveness check and contains {@link LivenessErrorCode} codes.
24
+ */
10
25
  get error(): LivenessException | null
11
26
 
12
27
  private constructor()
13
28
  }
14
29
 
30
+ /**
31
+ * The status of the Liveness processing.
32
+ */
15
33
  export enum LivenessStatus {
34
+ /**
35
+ * The liveness check is passed successfully.
36
+ */
16
37
  PASSED,
38
+ /**
39
+ * The liveness check result is unknown.
40
+ */
17
41
  UNKNOWN,
18
42
  }
@@ -1,10 +1,28 @@
1
1
  import { MatchFacesImage } from './match_faces_image'
2
2
  import { MatchFacesDetectionFace } from './match_faces_detection_face'
3
3
 
4
+ /**
5
+ * Represents a reference information of the compared face.
6
+ */
4
7
  export class ComparedFace {
8
+ /**
9
+ * The index to the input image in the input array provided to the request.
10
+ */
5
11
  get imageIndex(): number
12
+
13
+ /**
14
+ * The input image used for comparison operation.
15
+ */
6
16
  get image(): MatchFacesImage
17
+
18
+ /**
19
+ * The index to the array of `faces` in the `detection` results.
20
+ */
7
21
  get faceIndex(): number | null
22
+
23
+ /**
24
+ * The face detection result.
25
+ */
8
26
  get face(): MatchFacesDetectionFace | null
9
27
 
10
28
  private constructor()
@@ -1,11 +1,35 @@
1
1
  import { ComparedFace } from './compared_face'
2
2
  import { MatchFacesException } from './match_faces_exception'
3
3
 
4
+ /**
5
+ * Represents a result of the {@link ComparedFace} attempt to compare input images.
6
+ */
4
7
  export class ComparedFacesPair {
8
+ /**
9
+ * The first face in the comparison pair.
10
+ */
5
11
  get first(): ComparedFace
12
+
13
+ /**
14
+ * The second face in the comparison pair.
15
+ */
6
16
  get second(): ComparedFace
17
+
18
+ /**
19
+ * Similarity of the faces pair. Floating point value from 0 to 1.
20
+ */
7
21
  get similarity(): number
22
+
23
+ /**
24
+ * The raw value returned by the service without applying any thresholds or comparison rules.
25
+ * The value shows the degree of similarity of compared faces, the lower - the more similar, and vice versa less similar.
26
+ * The `score` is used in conjunction with the input image `imageType` to evaluate `similarity`.
27
+ */
8
28
  get score(): number
29
+
30
+ /**
31
+ * The error describes a failed pair comparison and contains {@link MatchFacesErrorCode} codes.
32
+ */
9
33
  get error(): MatchFacesException | null
10
34
 
11
35
  private constructor()
@@ -2,10 +2,28 @@ import { MatchFacesImage } from './match_faces_image'
2
2
  import { MatchFacesDetectionFace } from './match_faces_detection_face'
3
3
  import { MatchFacesException } from './match_faces_exception'
4
4
 
5
+ /**
6
+ * Represents detection results on an input image as a part of {@link MatchFacesResponse}.
7
+ */
5
8
  export class MatchFacesDetection {
9
+ /**
10
+ * The index to the input image in the input array provided to the request.
11
+ */
6
12
  get imageIndex(): number
13
+
14
+ /**
15
+ * The input image used for comparison operation.
16
+ */
7
17
  get image(): MatchFacesImage
18
+
19
+ /**
20
+ * The array of faces detected on the image.
21
+ */
8
22
  get faces(): Array<MatchFacesDetectionFace>
23
+
24
+ /**
25
+ * The error describes a failed face detection and contains {@link MatchFacesErrorCode} codes.
26
+ */
9
27
  get error(): MatchFacesException | null
10
28
 
11
29
  private constructor()