-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathp-process.yml
813 lines (757 loc) · 32.9 KB
/
p-process.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
openapi: 3.0.3
paths:
/process:
parameters:
- $ref: "./common.yml#/components/parameters/x-request"
post:
summary: Process list of documents images and return extracted data
operationId: api-process
tags:
- process
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ProcessRequest"
required: true
responses:
"200":
description: "Document reading result"
content:
application/json:
schema:
$ref: "#/components/schemas/ProcessResponse"
"400":
description: "Bad request. Check your input data."
"403":
description: "Bad license. Either server or request does not contain valid license."
x-codeSamples:
- lang: 'JavaScript'
source: |
import {DocumentReaderApi, FieldType, GraphicFieldType} from '@regulaforensics/document-reader-webclient/esm'
const {DOCUMENT_NUMBER, SURNAME_AND_GIVEN_NAMES, DATE_OF_BIRTH} = FieldType;
const {PORTRAIT, SIGNATURE} = GraphicFieldType;
const imageAsBase64String = getDocImageAsBase64String()
const api = new DocumentReaderApi({basePath: "http://localhost:8080"});
const result = await api.process(imageAsBase64String)
// text fields
const docNumber = result.getTextField(DOCUMENT_NUMBER)
const fullName = result.getTextField(SURNAME_AND_GIVEN_NAMES)
const dateOfBirth = result.getTextField(DATE_OF_BIRTH)
// graphics fields
const portraitAsBase64 = result.getGraphicsField(PORTRAIT)
const signatureAsBase64 = result.getGraphicsField(SIGNATURE)
- lang: 'Java'
source: |
byte[] imageBytes = readFile("australia_passport.jpg");
var image = new ProcessRequestImage(imageBytes, Light.WHITE);
var requestParams = new RecognitionParams()
.withScenario(Scenario.FULL_PROCESS)
.withResultTypeOutput(Result.STATUS, Result.TEXT, Result.IMAGES);
RecognitionRequest request = new RecognitionRequest(requestParams, List.of(image));
var api = new DocumentReaderApi();
RecognitionResponse response = api.process(request);
var status = response.status();
var docOverallStatus = status.getComplete() == CheckResult.OK ? "valid" : "not valid";
var docOpticalTextStatus = status.getDetailsOptical().getText();
var docNumberField = response.text().getField(DOCUMENT_NUMBER);
var docNumberMrz = docNumberField.getValue(Source.MRZ);
var docNumberMrzValidity = docNumberField.sourceValidity(Source.MRZ);
var docNumberMrzVisualMatching = docNumberField.crossSourceComparison(Source.MRZ, Source.VISUAL);
- lang: 'Python'
source: |
from regula.documentreader.webclient import *
with open("australia_passport.jpg", "rb") as f:
input_image = f.read()
with DocumentReaderApi(host='http://localhost:8080') as api:
params = ProcessParams(
scenario=Scenario.FULL_PROCESS,
result_type_output=[Result.DOCUMENT_IMAGE, Result.STATUS, Result.TEXT, Result.IMAGES]
)
request = RecognitionRequest(process_params=params, images=[input_image])
response = api.process(request)
# status examples
response_status = response.status
doc_overall_status = "valid" if response_status.overall_status == CheckResult.OK else "not valid"
# text fields example
doc_number_field = response.text.get_field(TextFieldType.DOCUMENT_NUMBER)
doc_number_mrz = doc_number_field.get_value()
doc_number_visual = doc_number_field.get_value(Source.VISUAL)
doc_number_visual_validity = doc_number_field.source_validity(Source.VISUAL)
doc_number_mrz_validity = doc_number_field.source_validity(Source.MRZ)
doc_number_mrz_visual_matching = doc_number_field.cross_source_comparison(Source.MRZ, Source.VISUAL)
# images fields example
normalized_input_image = response.images.document_image()
portrait_field = response.images.get_field(GraphicFieldType.PORTRAIT)
portrait_from_visual = portrait_field.get_value(Source.VISUAL)
portrait_from_rfid = portrait_field.get_value(Source.RFID, original=True)
- lang: 'C#'
source: |
var imageBytes = File.ReadAllBytes("australia_passport.jpg");
var image = new ProcessRequestImage(new ImageData(imageBytes), Light.WHITE);
var requestParams = new RecognitionParams()
.WithScenario(Scenario.FULL_PROCESS)
.WithResultTypeOutput(new List<int> { Result.STATUS, Result.TEXT, Result.IMAGES, Result.DOCUMENT_TYPE });
var request = new RecognitionRequest(requestParams, image);
var api = licenseFromEnv != null
? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv)
: new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile);
var response = api.Process(request);
// status examples
var status = response.Status();
string docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid";
string docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid";
// text fields examples
var docNumberField = response.Text().GetField(TextFieldType.DOCUMENT_NUMBER);
string docNumberVisual = docNumberField.GetValue(Source.VISUAL);
string docNumberMrz = docNumberField.GetValue(Source.MRZ);
int docNumberVisualValidity = docNumberField.SourceValidity(Source.VISUAL);
int docNumberMrzValidity = docNumberField.SourceValidity(Source.MRZ);
int docNumberMrzVisualMatching = docNumberField.CrossSourceComparison(Source.MRZ, Source.VISUAL);
// images fields examples
var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue();
var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT);
var portraitFromVisual = portraitField.GetValue(Source.VISUAL);
components:
schemas:
#############################
############################# Requests objects
# todo different image input types
ProcessRequest:
type: object
properties:
processParam:
$ref: "#/components/schemas/ProcessParams"
List:
type: array
items:
$ref: "#/components/schemas/ProcessRequestImage"
tag:
type: string
description: "Session ID"
tenant:
type: string
description: "Customer name"
env:
type: string
description: "Environment type"
livePortrait:
type: string
format: base64
example: "Base64 encoded data"
description: "Live portrait photo"
extPortrait:
type: string
format: base64
example: "Base64 encoded data"
description: "Portrait photo from an external source"
ContainerList:
$ref: "./rt.yml#/components/schemas/ContainerList"
systemInfo:
$ref: "#/components/schemas/ProcessSystemInfo"
passBackObject:
type: object
description: "Free-form object to be included in response. Must be object, not list or simple value.
Do not affect document processing. Use it freely to pass your app params. Stored in process logs."
additionalProperties: true
dtc:
type: string
description: "Digital Travel Credential (DTC-VC) data in base64 format for processing"
ImageUrls:
type: array
description: "URLs to the document images for processing."
items:
type: string
required:
- processParam
ProcessParams:
type: object
properties:
generateDTCVC:
type: boolean
description: "This parameter is used to generate separate DTC-VC data container from RFID session data."
lcidFilter:
description: "The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default."
type: array
items:
type: integer
lcidIgnoreFilter:
description: "The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default."
type: array
items:
type: integer
oneShotIdentification:
type: boolean
description: "This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face"
useFaceApi:
type: boolean
description: "This parameter allows comparing faces on Regula Face Web Service"
faceApi:
$ref: "./common.yml#/components/schemas/FaceApi"
doDetectCan:
type: boolean
description: "This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario."
imageOutputMaxHeight:
type: integer
description: "This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0."
imageOutputMaxWidth:
type: integer
description: "This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0."
scenario:
$ref: "./common.yml#/components/schemas/Scenario"
resultTypeOutput:
description: "Types of results to return in response. See 'Result' enum for available options"
type: array
items:
$ref: "./rt.yml#/components/schemas/Result"
doublePageSpread:
description: "Enable this option if the image you provide contains double page spread
of the passport and you want to process both pages in one go. It makes sense to use it for documents
that have meaningful information on both pages, like Russian domestic passport, or some others.
Disabled by default."
type: boolean
deprecated: true
# default false
generateDoublePageSpreadImage:
description: 'When enabled together with "doublePageSpread" and there is a passport with two pages
spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured
on a flatbed scanner. Disabled by default.'
type: boolean
# default false
fieldTypesFilter:
description: "List of text field types to extract. If empty, all text fields from template will be extracted.
Narrowing the list can shorten processing time. Empty by default."
type: array
items:
$ref: "./e-text-field-type.yml#/components/schemas/TextFieldType"
dateFormat:
description: "This option allows you to set dates format so that solution will return dates in this format.
For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue,
you will get '07/09/2020' as a result.
By default it is set to system locale default (where the service is running)."
type: string
example: "MM/dd/yyyy"
measureSystem:
description: "This option allows you to set the system of measurement used for converting original values
in document to output result values. Metric by default."
$ref: "#/components/schemas/MeasureSystem"
imageDpiOutMax:
description: "This parameter controls maximum resolution in dpi of output images.
Resolution will remain original in case 0 is supplied. By default is set to return images in response with
resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default."
type: integer
alreadyCropped:
description: "This option can be enabled if you know for sure that the image you provide contains
already cropped document by its edges. This was designed to process on the
server side images captured and cropped on mobile. Disabled by default."
type: boolean
# default false
customParams:
description: "This option allows passing custom processing parameters that can be implemented in future without
changing API."
type: object
additionalProperties: true
config:
description: "This option allows setting additional custom configuration per document type.
If recognized document has ID specified in config, processing adjusts according to designated configuration."
type: array
items:
$ref: "#/components/schemas/PerDocumentConfig"
log:
description: "When enabled, results will contain transaction processing log. Disabled by default"
type: boolean
# default false
logLevel:
description: "When used together with 'log' parameter enabled, sets the level of logs detalization. 'INFO' by default."
$ref: "#/components/schemas/LogLevel"
# default: "INFO"
forceDocID:
description: "Force use of specific template ID and skip document type identification step."
type: integer
matchTextFieldMask:
description: "When disabled, text field OCR will be done as is and then the recognized value will be
matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts
to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask
in the template. Enabled by default."
type: boolean
# default: true
fastDocDetect:
description: "When enabled, shorten the list of candidates to process during document detection in a
single image process mode. Reduces processing time for specific backgrounds. Enabled by default."
type: boolean
deprecated: true
# default: true
updateOCRValidityByGlare:
description: "When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default."
type: boolean
# default: false
checkRequiredTextFields:
description: "When enabled, each field in template will be checked for value presence and if the field
is marked as required, but has no value, it will have 'error' in validity status. Disabled by default."
type: boolean
# default: false
returnCroppedBarcode:
description: "When enabled, returns cropped barcode images for unknown documents. Disabled by default."
type: boolean
# default: false
imageQa:
$ref: "#/components/schemas/ImageQA"
strictImageQuality:
description: "When enabled, the image quality check status affects the document optical and overall status. Disabled by default."
type: boolean
# default: false
respectImageQuality:
description: "Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default."
type: boolean
deprecated: true
# default: false
forceDocFormat:
description: "Force use of specified document format when locating and recognizing document to reduce the number of candidates."
$ref: "./rt-doc-type-old.yml#/components/schemas/DocumentFormat"
noGraphics:
description: "When enabled, no graphic fields will be cropped from document image. Disabled by default."
type: boolean
# default: false
depersonalizeLog:
description: "When enabled, all personal data will be forcibly removed from the logs. Disabled by default."
type: boolean
# default: false
multiDocOnImage:
description: "This option allows locating and cropping multiple documents from one image if enabled. Disabled by default."
type: boolean
# default false
shiftExpiryDate:
description: "This option allows shifting the date of expiry into the future or past for number of months specified.
This is useful, for example, in some cases when document might be still valid for some period
after original expiration date to prevent negative validity status for such documents.
Or by shifting the date to the past will set negative validity for the documents
that is about to expire in a specified number of months. 0 by default"
type: integer
#default 0
minimalHolderAge:
description: "This options allows specifying the minimal age in years of the document holder
for the document to be considered valid."
type: integer
returnUncroppedImage:
description: "When enabled, returns input images in output. Disabled by default."
type: boolean
# default false
mrzFormatsFilter:
description: "This option allows limiting MRZ formats to be recognized by specifying them in array."
type: array
items:
$ref: "#/components/schemas/MRZFormat"
forceReadMrzBeforeLocate:
description: "When enabled, make sure that in series processing MRZ is located fully inside the result document image,
if present on the document. Enabling this option may add extra processing time, by disabling optimizations,
but allows more stability in output image quality. Disabled by default."
type: boolean
# default false
parseBarcodes:
description: "This option can be disabled to stop parsing after barcode is read. Enabled by default."
type: boolean
# default true
convertCase:
description: "This option allows output text case transformation. No changes applied by default to original values."
$ref: "#/components/schemas/TextPostProcessing"
splitNames:
description: "When enabled, the Surname and GivenNames fields from MRZ will be divided into
ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default."
type: boolean
# default false
disablePerforationOCR:
description: "When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default."
type: boolean
# default false
documentGroupFilter:
description: "List of specific eligible document types from DocumentType enum to recognize from.
You may, for example, specify only passports to be recognized by setting this property. Empty by default."
type: array
items:
$ref: "./e-document-type.yml#/components/schemas/DocumentType"
processAuth:
description: "Authenticity checks that should be performed regardless of the document type.
The available checks are listed in the eRPRM_Authenticity enum.
Note that only supported by your license checks can be added. "
type: integer
format: int64
deviceId:
description: "This parameter is used to specify the document reader device type from which input images were captured. Default 0."
type: integer
# default: 0
deviceType:
description: "This parameter is used to specify the document reader device type from which input images were captured. Default 0."
type: integer
# default: 0
deviceTypeHex:
type: string
description: "This parameter is used to specify the document reader device type from which input images were captured"
ignoreDeviceIdFromImage:
type: boolean
description: "This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false"
# default: false
documentIdList:
type: array
description: "List of the document ID's to process. All documents will be processed, if empty."
items:
type: integer
# default []
rfid:
type: object
description: "Params for the RFID chip data reprocessing"
properties:
paSensitiveCodesDisable:
description: "A list of notification codes that should be ignored during passive authentication (PA)"
type: array
items:
$ref: "./e-parsing-notification-codes.yml#/components/schemas/ParsingNotificationCodes"
checkAuth:
type: boolean
description: "This parameter is used to enable authenticity checks"
# default: true
authParams:
$ref: '#/components/schemas/AuthParams'
mrzDetectMode:
$ref: '#/components/schemas/mrzDetectModeEnum'
generateNumericCodes:
type: boolean
description: "This parameter is used to generate numeric representation for issuing state and nationality codes"
# default: false
strictBarcodeDigitalSignatureCheck:
type: boolean
description: "This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed."
# default: false
selectLongestNames:
type: boolean
description: "Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc."
# default: false
required:
- scenario
MRZFormat:
type: string
enum:
- "1x30"
- "3x30"
- "2x36"
- "2x44"
- "1x6"
- "2x30"
x-enum-varnames:
- "IDL"
- "ID1"
- "ID2"
- "ID3"
- "CAN"
- "ID1_2_30"
x-enum-descriptions:
- "1x30"
- "3x30"
- "2x36"
- "2x44"
- "1x6"
- "2x30"
TextPostProcessing:
type: integer
enum:
- 0
- 1
- 2
- 3
x-enum-varnames:
- "NO_CHANGE"
- "UPPERCASE"
- "LOWERCASE"
- "CAPITAL"
x-enum-descriptions:
- "Do not change"
- "Uppercase"
- "Lowercase"
- "Capital"
mrzDetectModeEnum:
type: integer
description: "Make better MRZ detection on complex noisy backgrounds, like BW photocopy of some documents."
enum:
- 0
- 1
- 2
x-enum-varnames:
- "eMDM_Default"
- "eMDM_ResizeBinarizeWindow"
- "eMDM_BlurBeforeBinarization"
AuthParams:
type: object
properties:
checkLiveness:
type: boolean
description: "This parameter is used to enable document liveness check"
# default: true
livenessParams:
$ref: '#/components/schemas/LivenessParams'
checkUVLuminiscence:
type: boolean
description: "This parameter is used to enable Document luminescence check in UV light"
# default: true
checkIRB900:
type: boolean
description: "This parameter is used to enable B900 ink MRZ contrast check in IR light"
# default: true
checkImagePatterns:
type: boolean
description: "This parameter is used to enable Image patterns presence/absence check (position, shape, color)"
# default: true
checkFibers:
type: boolean
description: "This parameter is used to enable Fibers detection"
# default: true
checkExtMRZ:
type: boolean
description: "This parameter is used to enable Extended MRZ Check"
# default: true
checkExtOCR:
type: boolean
description: "This parameter is used to enable Extended OCR Check"
# default: true
checkAxial:
type: boolean
description: "This parameter is used to enable laminate integrity check in axial light"
# default: true
checkBarcodeFormat:
type: boolean
description: "This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.)"
# default: true
checkIRVisibility:
type: boolean
description: "This parameter is used to enable Document elements visibility check in IR light"
# default: true
checkIPI:
type: boolean
description: "This parameter is used to enable Invisible Personal Information (IPI) check"
# default: true
checkPhotoEmbedding:
type: boolean
description: "This parameter is used to enable Owner's photo embedding check (is photo printed or sticked)"
# default: true
checkPhotoComparison:
type: boolean
description: "This parameter is used to enable Portrait comparison check"
# default: true
checkLetterScreen:
type: boolean
description: "This parameter is used to enable LetterScreen check"
# default: false
LivenessParams:
type: object
properties:
checkOVI:
type: boolean
description: "This parameter is used to enable OVI check"
# default: true
checkMLI:
type: boolean
description: "This parameter is used to enable MLI check"
# default: true
checkHolo:
type: boolean
description: "This parameter is used to enable Hologram detection"
# default: true
checkED:
type: boolean
description: "This parameter is used to enable Electronic device detection"
# default: true
MeasureSystem:
type: integer
example: 0
enum:
- 0
- 1
x-enum-descriptions:
- "Metric system of measurement, where things are measured in meters and grams"
- "Imperial System of Measurement, where things are measured in feet, inches and pounds"
x-enum-varnames:
- "METRIC"
- "IMPERIAL"
LogLevel:
type: string
enum:
- FatalError
- Error
- Warning
- Info
- Debug
x-enum-varnames:
- "FATAL_ERROR"
- "ERROR"
- "WARNING"
- "INFO"
- "DEBUG"
x-enum-descriptions:
- "Fatal error"
- "Error"
- "Warning"
- "Info"
- "Debug"
PerDocumentConfig:
type: object
properties:
docID:
description: "Specific template IDs, for which apply current custom configuration"
type: array
items:
type: integer
excludeAuthChecks:
description: "Contains items from AuthenticityResultType as sum via OR operation"
type: integer
example: 2
ImageQA:
type: object
properties:
brightnessThreshold:
description: "Set the threshold for an actual document brightness below which the check fails"
type: number
format: double
dpiThreshold:
description: "This parameter sets threshold for Image QA check of the presented document physical dpi. If
actual document dpi is below this threshold, check will fail."
type: integer
# default: 150
angleThreshold:
description: "This parameter sets threshold for Image QA check of the presented document perspective angle in
degrees. If actual document perspective angle is above this threshold, check will fail."
type: integer
# default: 5
focusCheck:
description: "This option enables focus check while performing image quality validation."
type: boolean
# default: false
glaresCheck:
description: "This option enables glares check while performing image quality validation."
type: boolean
# default: true
colornessCheck:
description: "This option enables colorness check while performing image quality validation."
type: boolean
# default: false
documentPositionIndent:
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/InputImageQualityChecks"
ProcessRequestImage:
type: object
properties:
ImageData:
$ref: "./common.yml#/components/schemas/ImageData"
light:
$ref: "./common.yml#/components/schemas/Light"
page_idx:
description: "page/image number"
type: integer
# default: 0
example:
light: 6
page_idx: 0
ImageData:
image: "<base64 image>"
ProcessSystemInfo:
type: object
properties:
license:
description: "Base64 encoded license file"
type: string
recaptcha_token:
description: "For internal use. Demo-sites recaptcha token."
type: string
#############################
############################# Response objects
ProcessResponse:
type: object
required:
- ProcessingFinished
- ContainerList
- TransactionInfo
properties:
ChipPage:
$ref: "./common.yml#/components/schemas/RfidLocation"
ProcessingFinished:
$ref: "#/components/schemas/ProcessingStatus"
ContainerList:
$ref: "./rt.yml#/components/schemas/ContainerList"
TransactionInfo:
$ref: "#/components/schemas/TransactionInfo"
log:
description: "Base64 encoded transaction processing log"
type: string
passBackObject:
type: object
description: "Free-form object provided in request. See passBackObject property of ProcessRequest."
additionalProperties: true
morePagesAvailable:
type: integer
elapsedTime:
type: integer
description: "Time the document processing has taken, ms."
ProcessingStatus:
type: integer
enum:
- 0
- 1
- 2
x-enum-descriptions:
- "Processing was not finished"
- "Processing finished"
- "Processing finished by timeout"
x-enum-varnames:
- "NOT_FINISHED"
- "FINISHED"
- "TIMEOUT"
TransactionInfo:
type: object
properties:
ComputerName:
description: "Computer name"
type: string
DateTime:
description: "Date and time"
type: string
DocumentsDatabase:
$ref: "#/components/schemas/DocumentsDatabase"
SystemInfo:
description: "System information"
type: string
Tag:
description: "Transaction tag"
type: string
TransactionID:
description: "Transaction identifier"
type: string
UserName:
description: "User name"
type: string
Version:
description: "SDK version"
type: string
example:
"ComputerName": "7cded6852d20"
"DateTime": "2020-05-27T08:17:03.247Z"
"TransactionID": "dc5eb444-ad6e-4ebc-8102-d62d5bb56a4e"
"UserName": "user"
DocumentsDatabase:
type: object
description: "Document database information"
properties:
Description:
description: "Document database description"
type: string
ExportDate:
description: "Date the document database was created"
type: string
ID:
description: "Document database identifier"
type: string
Version:
description: "Document database version"
type: string