From 3f61e3a77378f4ebf2a3e28609c6e767f628a67b Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Wed, 4 Dec 2024 17:40:32 +0300 Subject: [PATCH 1/5] SP-20030 - add expectedPass --- p-process.yml | 5 +++++ rt-image-quality.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/p-process.yml b/p-process.yml index a452768..0d59664 100644 --- a/p-process.yml +++ b/p-process.yml @@ -685,6 +685,11 @@ components: description: "This parameter specifies the necessary margin. Default 0." type: integer # default: 0 + expectedPass: + description: "This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process." + type: array + items: + $ref: "./rt-image-quality.yml#/components/schemas/ImageQualityChecks" ProcessRequestImage: type: object diff --git a/rt-image-quality.yml b/rt-image-quality.yml index 4a4e2f2..e9084b6 100644 --- a/rt-image-quality.yml +++ b/rt-image-quality.yml @@ -59,6 +59,38 @@ components: - "Signals if the portrait is present" - "Signals if the document image is bright enough" + ImageQualityChecks: + type: string + description: "Image quality checks" + enum: + - "glaresCheck" + - "focusCheck" + - "dpiThreshold" + - "colornessCheck" + - "IQC_Perspective" + - "documentPosition" + - "IQC_Portrait" + - "brightness" + x-enum-varnames: + - "ImageGlares" + - "ImageFocus" + - "ImageResolution" + - "ImageColorness" + - "Perspective" + - "Bounds" + - "Portrait" + - "Brightness" + x-enum-descriptions: + - "Signals glare presence on the image" + - "Signals whether image is in focus" + - "Signals if image resolution is below threshold" + - "Signals if image is colorless" + - "Signals if document in the image has prespective distortion above threshold" + - "Signals if document is not fully present in the image" + - "Signals if the portrait is present" + - "Signals if the document image is bright enough" + + AreaArray: type: object properties: From 26891a0750a7f5ca069124b49a6b00b225ad36cd Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Wed, 4 Dec 2024 17:44:57 +0300 Subject: [PATCH 2/5] SP-20030 - change varnames --- rt-image-quality.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rt-image-quality.yml b/rt-image-quality.yml index e9084b6..9793c0b 100644 --- a/rt-image-quality.yml +++ b/rt-image-quality.yml @@ -72,10 +72,10 @@ components: - "IQC_Portrait" - "brightness" x-enum-varnames: - - "ImageGlares" - - "ImageFocus" - - "ImageResolution" - - "ImageColorness" + - "Glares" + - "Focus" + - "Resolution" + - "Colorness" - "Perspective" - "Bounds" - "Portrait" From 70f9a53a72e8e51dc5c556c6f4efca6ad2ab7c87 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 5 Dec 2024 09:48:00 +0300 Subject: [PATCH 3/5] SP-20030 - change enum name --- p-process.yml | 2 +- rt-image-quality.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p-process.yml b/p-process.yml index 0d59664..0196d02 100644 --- a/p-process.yml +++ b/p-process.yml @@ -689,7 +689,7 @@ components: description: "This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process." type: array items: - $ref: "./rt-image-quality.yml#/components/schemas/ImageQualityChecks" + $ref: "./rt-image-quality.yml#/components/schemas/InputImageQualityChecks" ProcessRequestImage: type: object diff --git a/rt-image-quality.yml b/rt-image-quality.yml index 9793c0b..f46197e 100644 --- a/rt-image-quality.yml +++ b/rt-image-quality.yml @@ -59,9 +59,9 @@ components: - "Signals if the portrait is present" - "Signals if the document image is bright enough" - ImageQualityChecks: + InputImageQualityChecks: type: string - description: "Image quality checks" + description: "Input image quality checks for the document processing" enum: - "glaresCheck" - "focusCheck" From 80da7628ac2335987d08578ff57b8876d6ee0de1 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 5 Dec 2024 17:07:29 +0300 Subject: [PATCH 4/5] SP-20030 - change enum values --- rt-image-quality.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rt-image-quality.yml b/rt-image-quality.yml index f46197e..9446261 100644 --- a/rt-image-quality.yml +++ b/rt-image-quality.yml @@ -69,8 +69,8 @@ components: - "colornessCheck" - "IQC_Perspective" - "documentPosition" - - "IQC_Portrait" - - "brightness" + - "portraitCheck" + - "brightnessCheck" x-enum-varnames: - "Glares" - "Focus" From ba9c802439319d36a81c484035e219371ad39b03 Mon Sep 17 00:00:00 2001 From: Vladislav Yakimchik <31860804+vyakimchik@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:17:20 +0300 Subject: [PATCH 5/5] Update rt-image-quality.yml --- rt-image-quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-image-quality.yml b/rt-image-quality.yml index 9446261..7c6418f 100644 --- a/rt-image-quality.yml +++ b/rt-image-quality.yml @@ -67,7 +67,7 @@ components: - "focusCheck" - "dpiThreshold" - "colornessCheck" - - "IQC_Perspective" + - "perspectiveCheck" - "documentPosition" - "portraitCheck" - "brightnessCheck"