Skip to content

Commit 4c5c098

Browse files
Merge pull request #103 from regulaforensics/2f7df17e
Add checkLiveness field to Process Params
2 parents 68ff93c + ff3ba1e commit 4c5c098

File tree

4 files changed

+96
-4
lines changed

4 files changed

+96
-4
lines changed

regula/documentreader/webclient/gen/models/image_qa.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class ImageQA(object):
3232
and the value is json key in definition.
3333
"""
3434
openapi_types = {
35+
'brightness_threshold': 'float',
3536
'dpi_threshold': 'int',
3637
'angle_threshold': 'int',
3738
'focus_check': 'bool',
@@ -42,6 +43,7 @@ class ImageQA(object):
4243
}
4344

4445
attribute_map = {
46+
'brightness_threshold': 'brightnessThreshold',
4547
'dpi_threshold': 'dpiThreshold',
4648
'angle_threshold': 'angleThreshold',
4749
'focus_check': 'focusCheck',
@@ -51,12 +53,13 @@ class ImageQA(object):
5153
'document_position_indent': 'documentPositionIndent'
5254
}
5355

54-
def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, glares_check=None, colorness_check=None, moire_check=None, document_position_indent=None, local_vars_configuration=None): # noqa: E501
56+
def __init__(self, brightness_threshold=None, dpi_threshold=None, angle_threshold=None, focus_check=None, glares_check=None, colorness_check=None, moire_check=None, document_position_indent=None, local_vars_configuration=None): # noqa: E501
5557
"""ImageQA - a model defined in OpenAPI""" # noqa: E501
5658
if local_vars_configuration is None:
5759
local_vars_configuration = Configuration()
5860
self.local_vars_configuration = local_vars_configuration
5961

62+
self._brightness_threshold = None
6063
self._dpi_threshold = None
6164
self._angle_threshold = None
6265
self._focus_check = None
@@ -66,6 +69,8 @@ def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, g
6669
self._document_position_indent = None
6770
self.discriminator = None
6871

72+
if brightness_threshold is not None:
73+
self.brightness_threshold = brightness_threshold
6974
if dpi_threshold is not None:
7075
self.dpi_threshold = dpi_threshold
7176
if angle_threshold is not None:
@@ -81,6 +86,29 @@ def __init__(self, dpi_threshold=None, angle_threshold=None, focus_check=None, g
8186
if document_position_indent is not None:
8287
self.document_position_indent = document_position_indent
8388

89+
@property
90+
def brightness_threshold(self):
91+
"""Gets the brightness_threshold of this ImageQA. # noqa: E501
92+
93+
Set the threshold for an actual document brightness below which the check fails # noqa: E501
94+
95+
:return: The brightness_threshold of this ImageQA. # noqa: E501
96+
:rtype: float
97+
"""
98+
return self._brightness_threshold
99+
100+
@brightness_threshold.setter
101+
def brightness_threshold(self, brightness_threshold):
102+
"""Sets the brightness_threshold of this ImageQA.
103+
104+
Set the threshold for an actual document brightness below which the check fails # noqa: E501
105+
106+
:param brightness_threshold: The brightness_threshold of this ImageQA. # noqa: E501
107+
:type brightness_threshold: float
108+
"""
109+
110+
self._brightness_threshold = brightness_threshold
111+
84112
@property
85113
def dpi_threshold(self):
86114
"""Gets the dpi_threshold of this ImageQA. # noqa: E501

regula/documentreader/webclient/gen/models/image_quality_check_type.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class ImageQualityCheckType(object):
4040

4141
Portrait = int("7")
4242

43-
allowable_values = [ImageGlares, ImageFocus, ImageResolution, ImageColorness, Perspective, Bounds, ScreenCapture, Portrait] # noqa: E501
43+
Brightness = int("8")
44+
45+
allowable_values = [ImageGlares, ImageFocus, ImageResolution, ImageColorness, Perspective, Bounds, ScreenCapture, Portrait, Brightness] # noqa: E501
4446

4547
"""
4648
Attributes:

regula/documentreader/webclient/gen/models/lcid.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ class LCID(object):
7777

7878
BULGARIAN = int("1026")
7979

80+
BURMESE = int("1109")
81+
8082
CATALAN = int("1027")
8183

8284
CHINESE_HONGKONG_SAR = int("3076")
@@ -187,6 +189,8 @@ class LCID(object):
187189

188190
KAZAKH = int("1087")
189191

192+
KHMER = int("1107")
193+
190194
KONKANI = int("1111")
191195

192196
KOREAN = int("1042")
@@ -201,6 +205,8 @@ class LCID(object):
201205

202206
MALAY_BRUNEI_DARUSSALAM = int("2110")
203207

208+
MALTESE = int("1082")
209+
204210
MARATHI = int("1102")
205211

206212
MONGOLIAN_CYRILIC = int("1104")
@@ -309,7 +315,7 @@ class LCID(object):
309315

310316
CTC_TRADITIONAL = int("50002")
311317

312-
allowable_values = [LATIN, AFRIKAANS, ALBANIAN, ARABIC_ALGERIA, ARABIC_BAHRAIN, ARABIC_EGYPT, ARABIC_IRAQ, ARABIC_JORDAN, ARABIC_KUWAIT, ARABIC_LEBANON, ARABIC_LIBYA, ARABIC_MOROCCO, ARABIC_OMAN, ARABIC_QATAR, ARABIC_SAUDI_ARABIA, ARABIC_SYRIA, ARABIC_TUNISIA, ARABIC_UAE, ARABIC_YEMEN, ARABIC_ARMENIAN, AZERI_CYRILIC, AZERI_LATIN, BASQUE, BELARUSIAN, BULGARIAN, CATALAN, CHINESE_HONGKONG_SAR, CHINESE_MACAO_SAR, CHINESE, CHINESE_SINGAPORE, CHINESE_TAIWAN, CROATIAN, CZECH, DANISH, DIVEHI, DUTCH_BELGIUM, DUTCH_NETHERLANDS, ENGLISH_AUSTRALIA, ENGLISH_BELIZE, ENGLISH_CANADA, ENGLISH_CARRIBEAN, ENGLISH_IRELAND, ENGLISH_JAMAICA, ENGLISH_NEW_ZEALAND, ENGLISH_PHILIPPINES, ENGLISH_SOUTH_AFRICA, ENGLISH_TRINIDAD, ENGLISH_UK, ENGLISH_US, ENGLISH_ZIMBABWE, ESTONIAN, FAEROESE, FARSI, FINNISH, FRENCH_BELGIUM, FRENCH_CANADA, FRENCH_FRANCE, FRENCH_LUXEMBOURG, FRENCH_MONACO, FRENCH_SWITZERLAND, FYRO_MACEDONIAN, GALICIAN, GEORGIAN, GERMAN_AUSTRIA, GERMAN_GERMANY, GERMAN_LIECHTENSTEIN, GERMAN_LUXEMBOURG, GERMAN_SWITZERLAND, GREEK, GUJARATI, HEBREW, HINDI_INDIA, HUNGARIAN, ICELANDIC, INDONESIAN, ITALIAN_ITALY, ITALIAN_SWITZERLAND, JAPANESE, KANNADA, KAZAKH, KONKANI, KOREAN, KYRGYZ_CYRILICK, LATVIAN, LITHUANIAN, MALAY_MALAYSIA, MALAY_BRUNEI_DARUSSALAM, MARATHI, MONGOLIAN_CYRILIC, NORWEGIAN_BOKMAL, NORWEGIAN_NYORSK, POLISH, PORTUGUESE_BRAZIL, PORTUGUESE_PORTUGAL, PUNJABI, RHAETO_ROMANIC, ROMANIAN, RUSSIAN, SANSKRIT, SERBIAN_CYRILIC, SERBIAN_LATIN, SLOVAK, SLOVENIAN, SPANISH_ARGENTINA, SPANISH_BOLIVIA, SPANISH_CHILE, SPANICH_COLOMBIA, SPANISH_COSTA_RICA, SPANISH_DOMINICAN_REPUBLIC, SPANISH_ECUADOR, SPANISH_EL_SALVADOR, SPANISH_GUATEMALA, SPANISH_HONDURAS, SPANISH_MEXICO, SPANISH_NICARAGUA, SPANISH_PANAMA, SPANISH_PARAGUAY, SPANISH_PERU, SPANISH_PUERTO_RICO, SPANISH_TRADITIONAL_SORT, SPANISH_INTERNATIONAL_SORT, SPANISH_URUGUAY, SPANISH_VENEZUELA, SWAHILI, SWEDISH, SWEDISH_FINLAND, SYRIAC, TAMIL, TATAR, TELUGU, THAI_THAILAND, TURKISH, TAJIK_CYRILLIC, TURKMEN, UKRAINIAN, URDU, UZBEK_CYRILIC, UZBEK_LATIN, VIETNAMESE, CTC_SIMPLIFIED, CTC_TRADITIONAL] # noqa: E501
318+
allowable_values = [LATIN, AFRIKAANS, ALBANIAN, ARABIC_ALGERIA, ARABIC_BAHRAIN, ARABIC_EGYPT, ARABIC_IRAQ, ARABIC_JORDAN, ARABIC_KUWAIT, ARABIC_LEBANON, ARABIC_LIBYA, ARABIC_MOROCCO, ARABIC_OMAN, ARABIC_QATAR, ARABIC_SAUDI_ARABIA, ARABIC_SYRIA, ARABIC_TUNISIA, ARABIC_UAE, ARABIC_YEMEN, ARABIC_ARMENIAN, AZERI_CYRILIC, AZERI_LATIN, BASQUE, BELARUSIAN, BULGARIAN, BURMESE, CATALAN, CHINESE_HONGKONG_SAR, CHINESE_MACAO_SAR, CHINESE, CHINESE_SINGAPORE, CHINESE_TAIWAN, CROATIAN, CZECH, DANISH, DIVEHI, DUTCH_BELGIUM, DUTCH_NETHERLANDS, ENGLISH_AUSTRALIA, ENGLISH_BELIZE, ENGLISH_CANADA, ENGLISH_CARRIBEAN, ENGLISH_IRELAND, ENGLISH_JAMAICA, ENGLISH_NEW_ZEALAND, ENGLISH_PHILIPPINES, ENGLISH_SOUTH_AFRICA, ENGLISH_TRINIDAD, ENGLISH_UK, ENGLISH_US, ENGLISH_ZIMBABWE, ESTONIAN, FAEROESE, FARSI, FINNISH, FRENCH_BELGIUM, FRENCH_CANADA, FRENCH_FRANCE, FRENCH_LUXEMBOURG, FRENCH_MONACO, FRENCH_SWITZERLAND, FYRO_MACEDONIAN, GALICIAN, GEORGIAN, GERMAN_AUSTRIA, GERMAN_GERMANY, GERMAN_LIECHTENSTEIN, GERMAN_LUXEMBOURG, GERMAN_SWITZERLAND, GREEK, GUJARATI, HEBREW, HINDI_INDIA, HUNGARIAN, ICELANDIC, INDONESIAN, ITALIAN_ITALY, ITALIAN_SWITZERLAND, JAPANESE, KANNADA, KAZAKH, KHMER, KONKANI, KOREAN, KYRGYZ_CYRILICK, LATVIAN, LITHUANIAN, MALAY_MALAYSIA, MALAY_BRUNEI_DARUSSALAM, MALTESE, MARATHI, MONGOLIAN_CYRILIC, NORWEGIAN_BOKMAL, NORWEGIAN_NYORSK, POLISH, PORTUGUESE_BRAZIL, PORTUGUESE_PORTUGAL, PUNJABI, RHAETO_ROMANIC, ROMANIAN, RUSSIAN, SANSKRIT, SERBIAN_CYRILIC, SERBIAN_LATIN, SLOVAK, SLOVENIAN, SPANISH_ARGENTINA, SPANISH_BOLIVIA, SPANISH_CHILE, SPANICH_COLOMBIA, SPANISH_COSTA_RICA, SPANISH_DOMINICAN_REPUBLIC, SPANISH_ECUADOR, SPANISH_EL_SALVADOR, SPANISH_GUATEMALA, SPANISH_HONDURAS, SPANISH_MEXICO, SPANISH_NICARAGUA, SPANISH_PANAMA, SPANISH_PARAGUAY, SPANISH_PERU, SPANISH_PUERTO_RICO, SPANISH_TRADITIONAL_SORT, SPANISH_INTERNATIONAL_SORT, SPANISH_URUGUAY, SPANISH_VENEZUELA, SWAHILI, SWEDISH, SWEDISH_FINLAND, SYRIAC, TAMIL, TATAR, TELUGU, THAI_THAILAND, TURKISH, TAJIK_CYRILLIC, TURKMEN, UKRAINIAN, URDU, UZBEK_CYRILIC, UZBEK_LATIN, VIETNAMESE, CTC_SIMPLIFIED, CTC_TRADITIONAL] # noqa: E501
313319

314320
"""
315321
Attributes:

regula/documentreader/webclient/gen/models/process_params.py

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class ProcessParams(object):
3232
and the value is json key in definition.
3333
"""
3434
openapi_types = {
35+
'check_liveness': 'bool',
36+
'lcid_ignore_filter': 'list[int]',
3537
'one_shot_identification': 'bool',
3638
'use_face_api': 'bool',
3739
'face_api': 'FaceApi',
@@ -84,6 +86,8 @@ class ProcessParams(object):
8486
}
8587

8688
attribute_map = {
89+
'check_liveness': 'checkLiveness',
90+
'lcid_ignore_filter': 'lcidIgnoreFilter',
8791
'one_shot_identification': 'oneShotIdentification',
8892
'use_face_api': 'useFaceApi',
8993
'face_api': 'faceApi',
@@ -135,12 +139,14 @@ class ProcessParams(object):
135139
'rfid': 'rfid'
136140
}
137141

138-
def __init__(self, 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, respect_image_quality=None, force_doc_format=None, no_graphics=None, document_area_min=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, local_vars_configuration=None): # noqa: E501
142+
def __init__(self, check_liveness=False, lcid_ignore_filter=[], 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, respect_image_quality=None, force_doc_format=None, no_graphics=None, document_area_min=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, local_vars_configuration=None): # noqa: E501
139143
"""ProcessParams - a model defined in OpenAPI""" # noqa: E501
140144
if local_vars_configuration is None:
141145
local_vars_configuration = Configuration()
142146
self.local_vars_configuration = local_vars_configuration
143147

148+
self._check_liveness = None
149+
self._lcid_ignore_filter = None
144150
self._one_shot_identification = None
145151
self._use_face_api = None
146152
self._face_api = None
@@ -192,6 +198,10 @@ def __init__(self, one_shot_identification=None, use_face_api=None, face_api=Non
192198
self._rfid = None
193199
self.discriminator = None
194200

201+
if check_liveness is not None:
202+
self.check_liveness = check_liveness
203+
if lcid_ignore_filter is not None:
204+
self.lcid_ignore_filter = lcid_ignore_filter
195205
if one_shot_identification is not None:
196206
self.one_shot_identification = one_shot_identification
197207
if use_face_api is not None:
@@ -290,6 +300,52 @@ def __init__(self, one_shot_identification=None, use_face_api=None, face_api=Non
290300
if rfid is not None:
291301
self.rfid = rfid
292302

303+
@property
304+
def check_liveness(self):
305+
"""Gets the check_liveness of this ProcessParams. # noqa: E501
306+
307+
This parameter is used to enable document liveness check. # noqa: E501
308+
309+
:return: The check_liveness of this ProcessParams. # noqa: E501
310+
:rtype: bool
311+
"""
312+
return self._check_liveness
313+
314+
@check_liveness.setter
315+
def check_liveness(self, check_liveness):
316+
"""Sets the check_liveness of this ProcessParams.
317+
318+
This parameter is used to enable document liveness check. # noqa: E501
319+
320+
:param check_liveness: The check_liveness of this ProcessParams. # noqa: E501
321+
:type check_liveness: bool
322+
"""
323+
324+
self._check_liveness = check_liveness
325+
326+
@property
327+
def lcid_ignore_filter(self):
328+
"""Gets the lcid_ignore_filter of this ProcessParams. # noqa: E501
329+
330+
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
331+
332+
:return: The lcid_ignore_filter of this ProcessParams. # noqa: E501
333+
:rtype: list[int]
334+
"""
335+
return self._lcid_ignore_filter
336+
337+
@lcid_ignore_filter.setter
338+
def lcid_ignore_filter(self, lcid_ignore_filter):
339+
"""Sets the lcid_ignore_filter of this ProcessParams.
340+
341+
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
342+
343+
:param lcid_ignore_filter: The lcid_ignore_filter of this ProcessParams. # noqa: E501
344+
:type lcid_ignore_filter: list[int]
345+
"""
346+
347+
self._lcid_ignore_filter = lcid_ignore_filter
348+
293349
@property
294350
def one_shot_identification(self):
295351
"""Gets the one_shot_identification of this ProcessParams. # noqa: E501

0 commit comments

Comments
 (0)