-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathprocess_params.py
More file actions
executable file
·1754 lines (1312 loc) · 70.7 KB
/
process_params.py
File metadata and controls
executable file
·1754 lines (1312 loc) · 70.7 KB
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
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# coding: utf-8
"""
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from regula.documentreader.webclient.gen.configuration import Configuration
# this line was added to enable pycharm type hinting
from regula.documentreader.webclient.gen.models import *
"""
"""
class ProcessParams(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'generate_dtcvc': 'bool',
'lcid_filter': 'list[int]',
'lcid_ignore_filter': 'list[int]',
'one_shot_identification': 'bool',
'use_face_api': 'bool',
'face_api': 'FaceApi',
'do_detect_can': 'bool',
'image_output_max_height': 'int',
'image_output_max_width': 'int',
'scenario': 'Scenario',
'result_type_output': 'list[Result]',
'double_page_spread': 'bool',
'generate_double_page_spread_image': 'bool',
'field_types_filter': 'list[TextFieldType]',
'date_format': 'str',
'measure_system': 'MeasureSystem',
'image_dpi_out_max': 'int',
'already_cropped': 'bool',
'custom_params': 'dict(str, object)',
'config': 'list[PerDocumentConfig]',
'log': 'bool',
'log_level': 'LogLevel',
'force_doc_id': 'int',
'match_text_field_mask': 'bool',
'fast_doc_detect': 'bool',
'update_ocr_validity_by_glare': 'bool',
'check_required_text_fields': 'bool',
'return_cropped_barcode': 'bool',
'image_qa': 'ImageQA',
'strict_image_quality': 'bool',
'respect_image_quality': 'bool',
'force_doc_format': 'DocumentFormat',
'no_graphics': 'bool',
'depersonalize_log': 'bool',
'multi_doc_on_image': 'bool',
'shift_expiry_date': 'int',
'minimal_holder_age': 'int',
'return_uncropped_image': 'bool',
'mrz_formats_filter': 'list[MRZFormat]',
'force_read_mrz_before_locate': 'bool',
'parse_barcodes': 'bool',
'convert_case': 'TextPostProcessing',
'split_names': 'bool',
'disable_perforation_ocr': 'bool',
'document_group_filter': 'list[DocumentType]',
'process_auth': 'int',
'device_id': 'int',
'device_type': 'int',
'device_type_hex': 'str',
'ignore_device_id_from_image': 'bool',
'document_id_list': 'list[int]',
'rfid': 'ProcessParamsRfid',
'check_auth': 'bool',
'auth_params': 'AuthParams',
'mrz_detect_mode': 'MrzDetectModeEnum',
'generate_numeric_codes': 'bool',
'strict_barcode_digital_signature_check': 'bool',
'select_longest_names': 'bool',
'do_barcodes': 'list[InputBarcodeType]',
'strict_dl_category_expiry': 'bool'
}
attribute_map = {
'generate_dtcvc': 'generateDTCVC',
'lcid_filter': 'lcidFilter',
'lcid_ignore_filter': 'lcidIgnoreFilter',
'one_shot_identification': 'oneShotIdentification',
'use_face_api': 'useFaceApi',
'face_api': 'faceApi',
'do_detect_can': 'doDetectCan',
'image_output_max_height': 'imageOutputMaxHeight',
'image_output_max_width': 'imageOutputMaxWidth',
'scenario': 'scenario',
'result_type_output': 'resultTypeOutput',
'double_page_spread': 'doublePageSpread',
'generate_double_page_spread_image': 'generateDoublePageSpreadImage',
'field_types_filter': 'fieldTypesFilter',
'date_format': 'dateFormat',
'measure_system': 'measureSystem',
'image_dpi_out_max': 'imageDpiOutMax',
'already_cropped': 'alreadyCropped',
'custom_params': 'customParams',
'config': 'config',
'log': 'log',
'log_level': 'logLevel',
'force_doc_id': 'forceDocID',
'match_text_field_mask': 'matchTextFieldMask',
'fast_doc_detect': 'fastDocDetect',
'update_ocr_validity_by_glare': 'updateOCRValidityByGlare',
'check_required_text_fields': 'checkRequiredTextFields',
'return_cropped_barcode': 'returnCroppedBarcode',
'image_qa': 'imageQa',
'strict_image_quality': 'strictImageQuality',
'respect_image_quality': 'respectImageQuality',
'force_doc_format': 'forceDocFormat',
'no_graphics': 'noGraphics',
'depersonalize_log': 'depersonalizeLog',
'multi_doc_on_image': 'multiDocOnImage',
'shift_expiry_date': 'shiftExpiryDate',
'minimal_holder_age': 'minimalHolderAge',
'return_uncropped_image': 'returnUncroppedImage',
'mrz_formats_filter': 'mrzFormatsFilter',
'force_read_mrz_before_locate': 'forceReadMrzBeforeLocate',
'parse_barcodes': 'parseBarcodes',
'convert_case': 'convertCase',
'split_names': 'splitNames',
'disable_perforation_ocr': 'disablePerforationOCR',
'document_group_filter': 'documentGroupFilter',
'process_auth': 'processAuth',
'device_id': 'deviceId',
'device_type': 'deviceType',
'device_type_hex': 'deviceTypeHex',
'ignore_device_id_from_image': 'ignoreDeviceIdFromImage',
'document_id_list': 'documentIdList',
'rfid': 'rfid',
'check_auth': 'checkAuth',
'auth_params': 'authParams',
'mrz_detect_mode': 'mrzDetectMode',
'generate_numeric_codes': 'generateNumericCodes',
'strict_barcode_digital_signature_check': 'strictBarcodeDigitalSignatureCheck',
'select_longest_names': 'selectLongestNames',
'do_barcodes': 'doBarcodes',
'strict_dl_category_expiry': 'strictDLCategoryExpiry'
}
def __init__(self, generate_dtcvc=None, lcid_filter=None, lcid_ignore_filter=None, one_shot_identification=None, use_face_api=None, face_api=None, do_detect_can=None, image_output_max_height=None, image_output_max_width=None, scenario=None, result_type_output=None, double_page_spread=None, generate_double_page_spread_image=None, field_types_filter=None, date_format=None, measure_system=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, config=None, log=None, log_level=None, force_doc_id=None, match_text_field_mask=None, fast_doc_detect=None, update_ocr_validity_by_glare=None, check_required_text_fields=None, return_cropped_barcode=None, image_qa=None, strict_image_quality=None, respect_image_quality=None, force_doc_format=None, no_graphics=None, depersonalize_log=None, multi_doc_on_image=None, shift_expiry_date=None, minimal_holder_age=None, return_uncropped_image=None, mrz_formats_filter=None, force_read_mrz_before_locate=None, parse_barcodes=None, convert_case=None, split_names=None, disable_perforation_ocr=None, document_group_filter=None, process_auth=None, device_id=None, device_type=None, device_type_hex=None, ignore_device_id_from_image=None, document_id_list=None, rfid=None, check_auth=None, auth_params=None, mrz_detect_mode=None, generate_numeric_codes=None, strict_barcode_digital_signature_check=None, select_longest_names=None, do_barcodes=None, strict_dl_category_expiry=None, local_vars_configuration=None): # noqa: E501
"""ProcessParams - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._generate_dtcvc = None
self._lcid_filter = None
self._lcid_ignore_filter = None
self._one_shot_identification = None
self._use_face_api = None
self._face_api = None
self._do_detect_can = None
self._image_output_max_height = None
self._image_output_max_width = None
self._scenario = None
self._result_type_output = None
self._double_page_spread = None
self._generate_double_page_spread_image = None
self._field_types_filter = None
self._date_format = None
self._measure_system = None
self._image_dpi_out_max = None
self._already_cropped = None
self._custom_params = None
self._config = None
self._log = None
self._log_level = None
self._force_doc_id = None
self._match_text_field_mask = None
self._fast_doc_detect = None
self._update_ocr_validity_by_glare = None
self._check_required_text_fields = None
self._return_cropped_barcode = None
self._image_qa = None
self._strict_image_quality = None
self._respect_image_quality = None
self._force_doc_format = None
self._no_graphics = None
self._depersonalize_log = None
self._multi_doc_on_image = None
self._shift_expiry_date = None
self._minimal_holder_age = None
self._return_uncropped_image = None
self._mrz_formats_filter = None
self._force_read_mrz_before_locate = None
self._parse_barcodes = None
self._convert_case = None
self._split_names = None
self._disable_perforation_ocr = None
self._document_group_filter = None
self._process_auth = None
self._device_id = None
self._device_type = None
self._device_type_hex = None
self._ignore_device_id_from_image = None
self._document_id_list = None
self._rfid = None
self._check_auth = None
self._auth_params = None
self._mrz_detect_mode = None
self._generate_numeric_codes = None
self._strict_barcode_digital_signature_check = None
self._select_longest_names = None
self._do_barcodes = None
self._strict_dl_category_expiry = None
self.discriminator = None
if generate_dtcvc is not None:
self.generate_dtcvc = generate_dtcvc
if lcid_filter is not None:
self.lcid_filter = lcid_filter
if lcid_ignore_filter is not None:
self.lcid_ignore_filter = lcid_ignore_filter
if one_shot_identification is not None:
self.one_shot_identification = one_shot_identification
if use_face_api is not None:
self.use_face_api = use_face_api
if face_api is not None:
self.face_api = face_api
if do_detect_can is not None:
self.do_detect_can = do_detect_can
if image_output_max_height is not None:
self.image_output_max_height = image_output_max_height
if image_output_max_width is not None:
self.image_output_max_width = image_output_max_width
self.scenario = scenario
if result_type_output is not None:
self.result_type_output = result_type_output
if double_page_spread is not None:
self.double_page_spread = double_page_spread
if generate_double_page_spread_image is not None:
self.generate_double_page_spread_image = generate_double_page_spread_image
if field_types_filter is not None:
self.field_types_filter = field_types_filter
if date_format is not None:
self.date_format = date_format
if measure_system is not None:
self.measure_system = measure_system
if image_dpi_out_max is not None:
self.image_dpi_out_max = image_dpi_out_max
if already_cropped is not None:
self.already_cropped = already_cropped
if custom_params is not None:
self.custom_params = custom_params
if config is not None:
self.config = config
if log is not None:
self.log = log
if log_level is not None:
self.log_level = log_level
if force_doc_id is not None:
self.force_doc_id = force_doc_id
if match_text_field_mask is not None:
self.match_text_field_mask = match_text_field_mask
if fast_doc_detect is not None:
self.fast_doc_detect = fast_doc_detect
if update_ocr_validity_by_glare is not None:
self.update_ocr_validity_by_glare = update_ocr_validity_by_glare
if check_required_text_fields is not None:
self.check_required_text_fields = check_required_text_fields
if return_cropped_barcode is not None:
self.return_cropped_barcode = return_cropped_barcode
if image_qa is not None:
self.image_qa = image_qa
if strict_image_quality is not None:
self.strict_image_quality = strict_image_quality
if respect_image_quality is not None:
self.respect_image_quality = respect_image_quality
if force_doc_format is not None:
self.force_doc_format = force_doc_format
if no_graphics is not None:
self.no_graphics = no_graphics
if depersonalize_log is not None:
self.depersonalize_log = depersonalize_log
if multi_doc_on_image is not None:
self.multi_doc_on_image = multi_doc_on_image
if shift_expiry_date is not None:
self.shift_expiry_date = shift_expiry_date
if minimal_holder_age is not None:
self.minimal_holder_age = minimal_holder_age
if return_uncropped_image is not None:
self.return_uncropped_image = return_uncropped_image
if mrz_formats_filter is not None:
self.mrz_formats_filter = mrz_formats_filter
if force_read_mrz_before_locate is not None:
self.force_read_mrz_before_locate = force_read_mrz_before_locate
if parse_barcodes is not None:
self.parse_barcodes = parse_barcodes
if convert_case is not None:
self.convert_case = convert_case
if split_names is not None:
self.split_names = split_names
if disable_perforation_ocr is not None:
self.disable_perforation_ocr = disable_perforation_ocr
if document_group_filter is not None:
self.document_group_filter = document_group_filter
if process_auth is not None:
self.process_auth = process_auth
if device_id is not None:
self.device_id = device_id
if device_type is not None:
self.device_type = device_type
if device_type_hex is not None:
self.device_type_hex = device_type_hex
if ignore_device_id_from_image is not None:
self.ignore_device_id_from_image = ignore_device_id_from_image
if document_id_list is not None:
self.document_id_list = document_id_list
if rfid is not None:
self.rfid = rfid
if check_auth is not None:
self.check_auth = check_auth
if auth_params is not None:
self.auth_params = auth_params
if mrz_detect_mode is not None:
self.mrz_detect_mode = mrz_detect_mode
if generate_numeric_codes is not None:
self.generate_numeric_codes = generate_numeric_codes
if strict_barcode_digital_signature_check is not None:
self.strict_barcode_digital_signature_check = strict_barcode_digital_signature_check
if select_longest_names is not None:
self.select_longest_names = select_longest_names
if do_barcodes is not None:
self.do_barcodes = do_barcodes
if strict_dl_category_expiry is not None:
self.strict_dl_category_expiry = strict_dl_category_expiry
@property
def generate_dtcvc(self):
"""Gets the generate_dtcvc of this ProcessParams. # noqa: E501
This parameter is used to generate separate DTC-VC data container from RFID session data. # noqa: E501
:return: The generate_dtcvc of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._generate_dtcvc
@generate_dtcvc.setter
def generate_dtcvc(self, generate_dtcvc):
"""Sets the generate_dtcvc of this ProcessParams.
This parameter is used to generate separate DTC-VC data container from RFID session data. # noqa: E501
:param generate_dtcvc: The generate_dtcvc of this ProcessParams. # noqa: E501
:type generate_dtcvc: bool
"""
self._generate_dtcvc = generate_dtcvc
@property
def lcid_filter(self):
"""Gets the lcid_filter of this ProcessParams. # noqa: E501
The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. # noqa: E501
:return: The lcid_filter of this ProcessParams. # noqa: E501
:rtype: list[int]
"""
return self._lcid_filter
@lcid_filter.setter
def lcid_filter(self, lcid_filter):
"""Sets the lcid_filter of this ProcessParams.
The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. # noqa: E501
:param lcid_filter: The lcid_filter of this ProcessParams. # noqa: E501
:type lcid_filter: list[int]
"""
self._lcid_filter = lcid_filter
@property
def lcid_ignore_filter(self):
"""Gets the lcid_ignore_filter of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The lcid_ignore_filter of this ProcessParams. # noqa: E501
:rtype: list[int]
"""
return self._lcid_ignore_filter
@lcid_ignore_filter.setter
def lcid_ignore_filter(self, lcid_ignore_filter):
"""Sets the lcid_ignore_filter of this ProcessParams.
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. # noqa: E501
:param lcid_ignore_filter: The lcid_ignore_filter of this ProcessParams. # noqa: E501
:type lcid_ignore_filter: list[int]
"""
self._lcid_ignore_filter = lcid_ignore_filter
@property
def one_shot_identification(self):
"""Gets the one_shot_identification of this ProcessParams. # noqa: E501
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 # noqa: E501
:return: The one_shot_identification of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._one_shot_identification
@one_shot_identification.setter
def one_shot_identification(self, one_shot_identification):
"""Sets the one_shot_identification of this ProcessParams.
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 # noqa: E501
:param one_shot_identification: The one_shot_identification of this ProcessParams. # noqa: E501
:type one_shot_identification: bool
"""
self._one_shot_identification = one_shot_identification
@property
def use_face_api(self):
"""Gets the use_face_api of this ProcessParams. # noqa: E501
This parameter allows comparing faces on Regula Face Web Service # noqa: E501
:return: The use_face_api of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._use_face_api
@use_face_api.setter
def use_face_api(self, use_face_api):
"""Sets the use_face_api of this ProcessParams.
This parameter allows comparing faces on Regula Face Web Service # noqa: E501
:param use_face_api: The use_face_api of this ProcessParams. # noqa: E501
:type use_face_api: bool
"""
self._use_face_api = use_face_api
@property
def face_api(self):
"""Gets the face_api of this ProcessParams. # noqa: E501
:return: The face_api of this ProcessParams. # noqa: E501
:rtype: FaceApi
"""
return self._face_api
@face_api.setter
def face_api(self, face_api):
"""Sets the face_api of this ProcessParams.
:param face_api: The face_api of this ProcessParams. # noqa: E501
:type face_api: FaceApi
"""
self._face_api = face_api
@property
def do_detect_can(self):
"""Gets the do_detect_can of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The do_detect_can of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._do_detect_can
@do_detect_can.setter
def do_detect_can(self, do_detect_can):
"""Sets the do_detect_can of this ProcessParams.
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. # noqa: E501
:param do_detect_can: The do_detect_can of this ProcessParams. # noqa: E501
:type do_detect_can: bool
"""
self._do_detect_can = do_detect_can
@property
def image_output_max_height(self):
"""Gets the image_output_max_height of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The image_output_max_height of this ProcessParams. # noqa: E501
:rtype: int
"""
return self._image_output_max_height
@image_output_max_height.setter
def image_output_max_height(self, image_output_max_height):
"""Sets the image_output_max_height of this ProcessParams.
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. # noqa: E501
:param image_output_max_height: The image_output_max_height of this ProcessParams. # noqa: E501
:type image_output_max_height: int
"""
self._image_output_max_height = image_output_max_height
@property
def image_output_max_width(self):
"""Gets the image_output_max_width of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The image_output_max_width of this ProcessParams. # noqa: E501
:rtype: int
"""
return self._image_output_max_width
@image_output_max_width.setter
def image_output_max_width(self, image_output_max_width):
"""Sets the image_output_max_width of this ProcessParams.
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. # noqa: E501
:param image_output_max_width: The image_output_max_width of this ProcessParams. # noqa: E501
:type image_output_max_width: int
"""
self._image_output_max_width = image_output_max_width
@property
def scenario(self):
"""Gets the scenario of this ProcessParams. # noqa: E501
:return: The scenario of this ProcessParams. # noqa: E501
:rtype: Scenario
"""
return self._scenario
@scenario.setter
def scenario(self, scenario):
"""Sets the scenario of this ProcessParams.
:param scenario: The scenario of this ProcessParams. # noqa: E501
:type scenario: Scenario
"""
if self.local_vars_configuration.client_side_validation and scenario is None: # noqa: E501
raise ValueError("Invalid value for `scenario`, must not be `None`") # noqa: E501
self._scenario = scenario
@property
def result_type_output(self):
"""Gets the result_type_output of this ProcessParams. # noqa: E501
Types of results to return in response. See 'Result' enum for available options # noqa: E501
:return: The result_type_output of this ProcessParams. # noqa: E501
:rtype: list[Result]
"""
return self._result_type_output
@result_type_output.setter
def result_type_output(self, result_type_output):
"""Sets the result_type_output of this ProcessParams.
Types of results to return in response. See 'Result' enum for available options # noqa: E501
:param result_type_output: The result_type_output of this ProcessParams. # noqa: E501
:type result_type_output: list[Result]
"""
self._result_type_output = result_type_output
@property
def double_page_spread(self):
"""Gets the double_page_spread of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The double_page_spread of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._double_page_spread
@double_page_spread.setter
def double_page_spread(self, double_page_spread):
"""Sets the double_page_spread of this ProcessParams.
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. # noqa: E501
:param double_page_spread: The double_page_spread of this ProcessParams. # noqa: E501
:type double_page_spread: bool
"""
self._double_page_spread = double_page_spread
@property
def generate_double_page_spread_image(self):
"""Gets the generate_double_page_spread_image of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The generate_double_page_spread_image of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._generate_double_page_spread_image
@generate_double_page_spread_image.setter
def generate_double_page_spread_image(self, generate_double_page_spread_image):
"""Sets the generate_double_page_spread_image of this ProcessParams.
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. # noqa: E501
:param generate_double_page_spread_image: The generate_double_page_spread_image of this ProcessParams. # noqa: E501
:type generate_double_page_spread_image: bool
"""
self._generate_double_page_spread_image = generate_double_page_spread_image
@property
def field_types_filter(self):
"""Gets the field_types_filter of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The field_types_filter of this ProcessParams. # noqa: E501
:rtype: list[TextFieldType]
"""
return self._field_types_filter
@field_types_filter.setter
def field_types_filter(self, field_types_filter):
"""Sets the field_types_filter of this ProcessParams.
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. # noqa: E501
:param field_types_filter: The field_types_filter of this ProcessParams. # noqa: E501
:type field_types_filter: list[TextFieldType]
"""
self._field_types_filter = field_types_filter
@property
def date_format(self):
"""Gets the date_format of this ProcessParams. # noqa: E501
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). # noqa: E501
:return: The date_format of this ProcessParams. # noqa: E501
:rtype: str
"""
return self._date_format
@date_format.setter
def date_format(self, date_format):
"""Sets the date_format of this ProcessParams.
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). # noqa: E501
:param date_format: The date_format of this ProcessParams. # noqa: E501
:type date_format: str
"""
self._date_format = date_format
@property
def measure_system(self):
"""Gets the measure_system of this ProcessParams. # noqa: E501
:return: The measure_system of this ProcessParams. # noqa: E501
:rtype: MeasureSystem
"""
return self._measure_system
@measure_system.setter
def measure_system(self, measure_system):
"""Sets the measure_system of this ProcessParams.
:param measure_system: The measure_system of this ProcessParams. # noqa: E501
:type measure_system: MeasureSystem
"""
self._measure_system = measure_system
@property
def image_dpi_out_max(self):
"""Gets the image_dpi_out_max of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The image_dpi_out_max of this ProcessParams. # noqa: E501
:rtype: int
"""
return self._image_dpi_out_max
@image_dpi_out_max.setter
def image_dpi_out_max(self, image_dpi_out_max):
"""Sets the image_dpi_out_max of this ProcessParams.
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. # noqa: E501
:param image_dpi_out_max: The image_dpi_out_max of this ProcessParams. # noqa: E501
:type image_dpi_out_max: int
"""
self._image_dpi_out_max = image_dpi_out_max
@property
def already_cropped(self):
"""Gets the already_cropped of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The already_cropped of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._already_cropped
@already_cropped.setter
def already_cropped(self, already_cropped):
"""Sets the already_cropped of this ProcessParams.
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. # noqa: E501
:param already_cropped: The already_cropped of this ProcessParams. # noqa: E501
:type already_cropped: bool
"""
self._already_cropped = already_cropped
@property
def custom_params(self):
"""Gets the custom_params of this ProcessParams. # noqa: E501
This option allows passing custom processing parameters that can be implemented in future without changing API. # noqa: E501
:return: The custom_params of this ProcessParams. # noqa: E501
:rtype: dict(str, object)
"""
return self._custom_params
@custom_params.setter
def custom_params(self, custom_params):
"""Sets the custom_params of this ProcessParams.
This option allows passing custom processing parameters that can be implemented in future without changing API. # noqa: E501
:param custom_params: The custom_params of this ProcessParams. # noqa: E501
:type custom_params: dict(str, object)
"""
self._custom_params = custom_params
@property
def config(self):
"""Gets the config of this ProcessParams. # noqa: E501
This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. # noqa: E501
:return: The config of this ProcessParams. # noqa: E501
:rtype: list[PerDocumentConfig]
"""
return self._config
@config.setter
def config(self, config):
"""Sets the config of this ProcessParams.
This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. # noqa: E501
:param config: The config of this ProcessParams. # noqa: E501
:type config: list[PerDocumentConfig]
"""
self._config = config
@property
def log(self):
"""Gets the log of this ProcessParams. # noqa: E501
When enabled, results will contain transaction processing log. Disabled by default # noqa: E501
:return: The log of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._log
@log.setter
def log(self, log):
"""Sets the log of this ProcessParams.
When enabled, results will contain transaction processing log. Disabled by default # noqa: E501
:param log: The log of this ProcessParams. # noqa: E501
:type log: bool
"""
self._log = log
@property
def log_level(self):
"""Gets the log_level of this ProcessParams. # noqa: E501
:return: The log_level of this ProcessParams. # noqa: E501
:rtype: LogLevel
"""
return self._log_level
@log_level.setter
def log_level(self, log_level):
"""Sets the log_level of this ProcessParams.
:param log_level: The log_level of this ProcessParams. # noqa: E501
:type log_level: LogLevel
"""
self._log_level = log_level
@property
def force_doc_id(self):
"""Gets the force_doc_id of this ProcessParams. # noqa: E501
Force use of specific template ID and skip document type identification step. # noqa: E501
:return: The force_doc_id of this ProcessParams. # noqa: E501
:rtype: int
"""
return self._force_doc_id
@force_doc_id.setter
def force_doc_id(self, force_doc_id):
"""Sets the force_doc_id of this ProcessParams.
Force use of specific template ID and skip document type identification step. # noqa: E501
:param force_doc_id: The force_doc_id of this ProcessParams. # noqa: E501
:type force_doc_id: int
"""
self._force_doc_id = force_doc_id
@property
def match_text_field_mask(self):
"""Gets the match_text_field_mask of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The match_text_field_mask of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._match_text_field_mask
@match_text_field_mask.setter
def match_text_field_mask(self, match_text_field_mask):
"""Sets the match_text_field_mask of this ProcessParams.
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. # noqa: E501
:param match_text_field_mask: The match_text_field_mask of this ProcessParams. # noqa: E501
:type match_text_field_mask: bool
"""
self._match_text_field_mask = match_text_field_mask
@property
def fast_doc_detect(self):
"""Gets the fast_doc_detect of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The fast_doc_detect of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._fast_doc_detect
@fast_doc_detect.setter
def fast_doc_detect(self, fast_doc_detect):
"""Sets the fast_doc_detect of this ProcessParams.
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. # noqa: E501
:param fast_doc_detect: The fast_doc_detect of this ProcessParams. # noqa: E501
:type fast_doc_detect: bool
"""
self._fast_doc_detect = fast_doc_detect
@property
def update_ocr_validity_by_glare(self):
"""Gets the update_ocr_validity_by_glare of this ProcessParams. # noqa: E501
When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. # noqa: E501
:return: The update_ocr_validity_by_glare of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._update_ocr_validity_by_glare
@update_ocr_validity_by_glare.setter
def update_ocr_validity_by_glare(self, update_ocr_validity_by_glare):
"""Sets the update_ocr_validity_by_glare of this ProcessParams.
When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. # noqa: E501
:param update_ocr_validity_by_glare: The update_ocr_validity_by_glare of this ProcessParams. # noqa: E501
:type update_ocr_validity_by_glare: bool
"""
self._update_ocr_validity_by_glare = update_ocr_validity_by_glare
@property
def check_required_text_fields(self):
"""Gets the check_required_text_fields of this ProcessParams. # noqa: E501
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. # noqa: E501
:return: The check_required_text_fields of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._check_required_text_fields
@check_required_text_fields.setter
def check_required_text_fields(self, check_required_text_fields):
"""Sets the check_required_text_fields of this ProcessParams.
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. # noqa: E501
:param check_required_text_fields: The check_required_text_fields of this ProcessParams. # noqa: E501
:type check_required_text_fields: bool
"""
self._check_required_text_fields = check_required_text_fields
@property
def return_cropped_barcode(self):
"""Gets the return_cropped_barcode of this ProcessParams. # noqa: E501
When enabled, returns cropped barcode images for unknown documents. Disabled by default. # noqa: E501
:return: The return_cropped_barcode of this ProcessParams. # noqa: E501
:rtype: bool
"""
return self._return_cropped_barcode
@return_cropped_barcode.setter
def return_cropped_barcode(self, return_cropped_barcode):
"""Sets the return_cropped_barcode of this ProcessParams.
When enabled, returns cropped barcode images for unknown documents. Disabled by default. # noqa: E501
:param return_cropped_barcode: The return_cropped_barcode of this ProcessParams. # noqa: E501
:type return_cropped_barcode: bool
"""
self._return_cropped_barcode = return_cropped_barcode
@property
def image_qa(self):
"""Gets the image_qa of this ProcessParams. # noqa: E501
:return: The image_qa of this ProcessParams. # noqa: E501
:rtype: ImageQA
"""
return self._image_qa
@image_qa.setter
def image_qa(self, image_qa):
"""Sets the image_qa of this ProcessParams.