From 8b715bb577fa5f678ffe0a15e5ffcfeacc2fd50c Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 22 Sep 2023 17:47:39 +0300 Subject: [PATCH 1/6] SP-11596: Add outputImageParams --- matching.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/matching.yml b/matching.yml index 811849e..181693b 100755 --- a/matching.yml +++ b/matching.yml @@ -25,9 +25,12 @@ paths: 403: $ref: "./common.yml#/components/responses/BadLicense" +info: + title: Regula FaceSDK Web API + version: 5.2.0 + components: schemas: - MatchRequest: type: object required: @@ -45,6 +48,46 @@ components: description: "The array of all images included in the comparison." items: $ref: "#/components/schemas/MatchImage" + outputImageParams: + type: object + description: "Whether to process the uploaded image according to the indicated settings." + properties: + backgroundColor: + type: array + description: "The RGB value of a color for filling background behind a person's silhouette and for aligning the image." + default: null + items: + type: integer + crop: + type: object + description: "Whether to return the Base64 of an aligned and cropped portrait in the crop field." + properties: + padColor: + type: array + description: "The RGB value of a color for filling background behind a person's silhouette and for aligning the image." + default: null + items: + type: integer + returnOriginalRect: + type: boolean + description: "Whether to return the coordinates of the rectangle with the face in the original image prepared for the face crop." + default: null + size: + type: array + description: "The resize value in case type matches this value. If it doesn't, no resize is done." + default: null + items: + type: integer + type: + type: integer + description: "The aspect ratio according to which face alignment is performed during face detection." + default: null + enum: + - 0 + - 1 + - 2 + - 3 + - 4 MatchImageIndex: type: integer @@ -142,11 +185,15 @@ components: example: [ [ x, y ] ] rotationAngle: description: "Angle of rotation of the face from the vertical axis, degrees." - type: float + type: number roi: $ref: "./common.yml#/components/schemas/FaceRectangular" thumbnail: $ref: "./common.yml#/components/schemas/Thumbnail" + crop: + type: string + format: byte + description: "Base64 of the cropped portrait." ImageSource: description: "The type of the image, defines the way the comparison is performed. See the enum: https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/image-source/" From fb773e16a9b42936d0c1c3c4dceeaf1e7b4a09b1 Mon Sep 17 00:00:00 2001 From: Iryna Haroshka Date: Fri, 22 Sep 2023 17:19:24 +0300 Subject: [PATCH 2/6] Revert "SP-11596: Add outputImageParams" (#67) --- matching.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/matching.yml b/matching.yml index 181693b..9584c3c 100755 --- a/matching.yml +++ b/matching.yml @@ -31,6 +31,7 @@ info: components: schemas: + MatchRequest: type: object required: From dd519131aa85946110cff68c577aeac030784872 Mon Sep 17 00:00:00 2001 From: Iryna Haroshka Date: Wed, 27 Sep 2023 13:10:04 +0300 Subject: [PATCH 3/6] marked thumbnails deprecated + minor fixes (#70) --- common.yml | 8 ++++---- detect.yml | 2 +- matching.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common.yml b/common.yml index 9e18f3e..ffacc4f 100755 --- a/common.yml +++ b/common.yml @@ -73,7 +73,7 @@ components: description: "The RGB value for the background color: the silhouette of a person is cut out and the background is filled with this color." $ref: "#/components/schemas/RGB" crop: - description: "Whether to return the Base64 of an aligned and cropped portrait in the crop field." + description: "Whether to return the Base64 of an aligned and cropped portrait in the `crop` field." $ref: "#/components/schemas/Crop" QualityRequest: @@ -88,11 +88,11 @@ components: Crop: type: object - description: "Whether to return the Base64 of an aligned and cropped portrait in the crop field." + description: "Whether to return the Base64 image of an aligned and cropped portrait in the `crop` field." properties: type: $ref: "#/components/schemas/FaceImageQualityAlignType" - description: "The dimensions ratio to the height of the required pattern." + description: "The aspect ratio according to which face alignment is performed during face detection." example: 1 padColor: $ref: "#/components/schemas/RGB" @@ -103,7 +103,7 @@ components: type: integer minItems: 2 maxItems: 2 - description: "The resize value in case type matches this value. If it doesn't, no resize is done." + description: "The resize value in case `type` matches this value. If it doesn't, no resize is performed." example: [300, 400] returnOriginalRect: type: boolean diff --git a/detect.yml b/detect.yml index 5a14914..776190d 100644 --- a/detect.yml +++ b/detect.yml @@ -39,7 +39,7 @@ components: image: $ref: "./common.yml#/components/schemas/ImageData" thumbnails: - description: "Whether to return the cropped portrains with the detected faces." + description: "Deprecated, use the `crop` field in `processParam` instead." type: boolean default: false diff --git a/matching.yml b/matching.yml index 9584c3c..66c33a0 100755 --- a/matching.yml +++ b/matching.yml @@ -42,7 +42,7 @@ components: description: "Session identificator." thumbnails: type: boolean - description: "Whether to return thumbnails: Base64 cropped images that contain vertically aligned faces." + description: "Deprecated, use the `crop` field in `outputImageParams` instead." default: false images: type: array @@ -61,7 +61,7 @@ components: type: integer crop: type: object - description: "Whether to return the Base64 of an aligned and cropped portrait in the crop field." + description: "Whether to return the Base64 of an aligned and cropped portrait in the `crop` field." properties: padColor: type: array @@ -75,7 +75,7 @@ components: default: null size: type: array - description: "The resize value in case type matches this value. If it doesn't, no resize is done." + description: "The resize value in case `type` matches this value. If it doesn't, no resize is performed." default: null items: type: integer From 2d8a5afd618e489af272ad0d36d8911988615e02 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 27 Sep 2023 14:40:27 +0300 Subject: [PATCH 4/6] Mark thumbnails as deprecated --- matching.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/matching.yml b/matching.yml index 66c33a0..0cfeb04 100755 --- a/matching.yml +++ b/matching.yml @@ -44,6 +44,7 @@ components: type: boolean description: "Deprecated, use the `crop` field in `outputImageParams` instead." default: false + deprecated: true images: type: array description: "The array of all images included in the comparison." From 2df7dcd40074e22ce3b28008384c346c8af99dc0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 20 Dec 2023 12:45:38 +0300 Subject: [PATCH 5/6] Fix release version --- index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.yml b/index.yml index 890e719..ab71794 100755 --- a/index.yml +++ b/index.yml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - version: 5.2.0 + version: 6.1.0 title: Regula FaceSDK Web API x-logo: url: 'https://static-content.regulaforensics.com/Icons/Logos/Regula-logo.svg' From a3bd8d3d7174316c99dbf3977a69eb0ba9b53a0e Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 20 Dec 2023 12:46:30 +0300 Subject: [PATCH 6/6] Update release version --- matching.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matching.yml b/matching.yml index 0cfeb04..b5fb34f 100755 --- a/matching.yml +++ b/matching.yml @@ -27,7 +27,7 @@ paths: info: title: Regula FaceSDK Web API - version: 5.2.0 + version: 6.1.0 components: schemas: