tencentcloud-sdk-python-ocr 3.0.1416__py2.py3-none-any.whl → 3.0.1433__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tencentcloud-sdk-python-ocr might be problematic. Click here for more details.

tencentcloud/__init__.py CHANGED
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1416'
17
+ __version__ = '3.0.1433'
@@ -1974,11 +1974,14 @@ class BizLicenseOCRRequest(AbstractModel):
1974
1974
  :type EnableCopyWarn: bool
1975
1975
  :param _EnablePeriodComplete: 是否返回自动拼接的有效期,默认为true
1976
1976
  :type EnablePeriodComplete: bool
1977
+ :param _EnableBusinessCertificate: 是否支持营业类证件识别(包括营业执照和非营业执照的其他证件),默认为false
1978
+ :type EnableBusinessCertificate: bool
1977
1979
  """
1978
1980
  self._ImageBase64 = None
1979
1981
  self._ImageUrl = None
1980
1982
  self._EnableCopyWarn = None
1981
1983
  self._EnablePeriodComplete = None
1984
+ self._EnableBusinessCertificate = None
1982
1985
 
1983
1986
  @property
1984
1987
  def ImageBase64(self):
@@ -2031,12 +2034,24 @@ class BizLicenseOCRRequest(AbstractModel):
2031
2034
  def EnablePeriodComplete(self, EnablePeriodComplete):
2032
2035
  self._EnablePeriodComplete = EnablePeriodComplete
2033
2036
 
2037
+ @property
2038
+ def EnableBusinessCertificate(self):
2039
+ """是否支持营业类证件识别(包括营业执照和非营业执照的其他证件),默认为false
2040
+ :rtype: bool
2041
+ """
2042
+ return self._EnableBusinessCertificate
2043
+
2044
+ @EnableBusinessCertificate.setter
2045
+ def EnableBusinessCertificate(self, EnableBusinessCertificate):
2046
+ self._EnableBusinessCertificate = EnableBusinessCertificate
2047
+
2034
2048
 
2035
2049
  def _deserialize(self, params):
2036
2050
  self._ImageBase64 = params.get("ImageBase64")
2037
2051
  self._ImageUrl = params.get("ImageUrl")
2038
2052
  self._EnableCopyWarn = params.get("EnableCopyWarn")
2039
2053
  self._EnablePeriodComplete = params.get("EnablePeriodComplete")
2054
+ self._EnableBusinessCertificate = params.get("EnableBusinessCertificate")
2040
2055
  memeber_set = set(params.keys())
2041
2056
  for name, value in vars(self).items():
2042
2057
  property_name = name[1:]
@@ -2104,6 +2119,8 @@ WARN_RESHOOT_CARD翻拍件告警
2104
2119
  :type RegistrationAuthority: str
2105
2120
  :param _Electronic: 是否是电子营业执照。false为没有,true为有。
2106
2121
  :type Electronic: bool
2122
+ :param _BusinessCertificate: 非营业执照的营业类证件识别结果,将以结构化形式呈现。
2123
+ :type BusinessCertificate: list of BusinessCertificateInfo
2107
2124
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
2108
2125
  :type RequestId: str
2109
2126
  """
@@ -2129,6 +2146,7 @@ WARN_RESHOOT_CARD翻拍件告警
2129
2146
  self._SerialNumber = None
2130
2147
  self._RegistrationAuthority = None
2131
2148
  self._Electronic = None
2149
+ self._BusinessCertificate = None
2132
2150
  self._RequestId = None
2133
2151
 
2134
2152
  @property
@@ -2379,6 +2397,17 @@ WARN_RESHOOT_CARD翻拍件告警
2379
2397
  def Electronic(self, Electronic):
2380
2398
  self._Electronic = Electronic
2381
2399
 
2400
+ @property
2401
+ def BusinessCertificate(self):
2402
+ """非营业执照的营业类证件识别结果,将以结构化形式呈现。
2403
+ :rtype: list of BusinessCertificateInfo
2404
+ """
2405
+ return self._BusinessCertificate
2406
+
2407
+ @BusinessCertificate.setter
2408
+ def BusinessCertificate(self, BusinessCertificate):
2409
+ self._BusinessCertificate = BusinessCertificate
2410
+
2382
2411
  @property
2383
2412
  def RequestId(self):
2384
2413
  """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -2414,6 +2443,12 @@ WARN_RESHOOT_CARD翻拍件告警
2414
2443
  self._SerialNumber = params.get("SerialNumber")
2415
2444
  self._RegistrationAuthority = params.get("RegistrationAuthority")
2416
2445
  self._Electronic = params.get("Electronic")
2446
+ if params.get("BusinessCertificate") is not None:
2447
+ self._BusinessCertificate = []
2448
+ for item in params.get("BusinessCertificate"):
2449
+ obj = BusinessCertificateInfo()
2450
+ obj._deserialize(item)
2451
+ self._BusinessCertificate.append(obj)
2417
2452
  self._RequestId = params.get("RequestId")
2418
2453
 
2419
2454
 
@@ -3211,6 +3246,74 @@ class BusinessCardOCRResponse(AbstractModel):
3211
3246
  self._RequestId = params.get("RequestId")
3212
3247
 
3213
3248
 
3249
+ class BusinessCertificateInfo(AbstractModel):
3250
+ """非营业执照的营业类证件识别结果,将以结构化形式呈现。
3251
+
3252
+ """
3253
+
3254
+ def __init__(self):
3255
+ r"""
3256
+ :param _Name: 识别出的名称
3257
+ :type Name: str
3258
+ :param _Value: 识别出的字段名称对应的值
3259
+ :type Value: str
3260
+ :param _Rect: 坐标
3261
+ :type Rect: :class:`tencentcloud.ocr.v20181119.models.Rect`
3262
+ """
3263
+ self._Name = None
3264
+ self._Value = None
3265
+ self._Rect = None
3266
+
3267
+ @property
3268
+ def Name(self):
3269
+ """识别出的名称
3270
+ :rtype: str
3271
+ """
3272
+ return self._Name
3273
+
3274
+ @Name.setter
3275
+ def Name(self, Name):
3276
+ self._Name = Name
3277
+
3278
+ @property
3279
+ def Value(self):
3280
+ """识别出的字段名称对应的值
3281
+ :rtype: str
3282
+ """
3283
+ return self._Value
3284
+
3285
+ @Value.setter
3286
+ def Value(self, Value):
3287
+ self._Value = Value
3288
+
3289
+ @property
3290
+ def Rect(self):
3291
+ """坐标
3292
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.Rect`
3293
+ """
3294
+ return self._Rect
3295
+
3296
+ @Rect.setter
3297
+ def Rect(self, Rect):
3298
+ self._Rect = Rect
3299
+
3300
+
3301
+ def _deserialize(self, params):
3302
+ self._Name = params.get("Name")
3303
+ self._Value = params.get("Value")
3304
+ if params.get("Rect") is not None:
3305
+ self._Rect = Rect()
3306
+ self._Rect._deserialize(params.get("Rect"))
3307
+ memeber_set = set(params.keys())
3308
+ for name, value in vars(self).items():
3309
+ property_name = name[1:]
3310
+ if property_name in memeber_set:
3311
+ memeber_set.remove(property_name)
3312
+ if len(memeber_set) > 0:
3313
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
3314
+
3315
+
3316
+
3214
3317
  class CandWord(AbstractModel):
3215
3318
  """候选字符集(包含候选字Character以及置信度Confidence)
3216
3319
 
@@ -3499,12 +3602,20 @@ class CardWarnInfo(AbstractModel):
3499
3602
  0:正常
3500
3603
  1:有PS
3501
3604
  :type PSCheck: int
3605
+ :param _BlurCheck: 是否模糊:
3606
+ 0:正常
3607
+ 1:模糊
3608
+ :type BlurCheck: int
3609
+ :param _BlurScore: 模糊分数, 范围:0.0-1.0,分数越高越模糊,建议阈值为0.5
3610
+ :type BlurScore: float
3502
3611
  """
3503
3612
  self._BorderCheck = None
3504
3613
  self._OcclusionCheck = None
3505
3614
  self._CopyCheck = None
3506
3615
  self._ReshootCheck = None
3507
3616
  self._PSCheck = None
3617
+ self._BlurCheck = None
3618
+ self._BlurScore = None
3508
3619
 
3509
3620
  @property
3510
3621
  def BorderCheck(self):
@@ -3571,6 +3682,30 @@ class CardWarnInfo(AbstractModel):
3571
3682
  def PSCheck(self, PSCheck):
3572
3683
  self._PSCheck = PSCheck
3573
3684
 
3685
+ @property
3686
+ def BlurCheck(self):
3687
+ """是否模糊:
3688
+ 0:正常
3689
+ 1:模糊
3690
+ :rtype: int
3691
+ """
3692
+ return self._BlurCheck
3693
+
3694
+ @BlurCheck.setter
3695
+ def BlurCheck(self, BlurCheck):
3696
+ self._BlurCheck = BlurCheck
3697
+
3698
+ @property
3699
+ def BlurScore(self):
3700
+ """模糊分数, 范围:0.0-1.0,分数越高越模糊,建议阈值为0.5
3701
+ :rtype: float
3702
+ """
3703
+ return self._BlurScore
3704
+
3705
+ @BlurScore.setter
3706
+ def BlurScore(self, BlurScore):
3707
+ self._BlurScore = BlurScore
3708
+
3574
3709
 
3575
3710
  def _deserialize(self, params):
3576
3711
  self._BorderCheck = params.get("BorderCheck")
@@ -3578,6 +3713,8 @@ class CardWarnInfo(AbstractModel):
3578
3713
  self._CopyCheck = params.get("CopyCheck")
3579
3714
  self._ReshootCheck = params.get("ReshootCheck")
3580
3715
  self._PSCheck = params.get("PSCheck")
3716
+ self._BlurCheck = params.get("BlurCheck")
3717
+ self._BlurScore = params.get("BlurScore")
3581
3718
  memeber_set = set(params.keys())
3582
3719
  for name, value in vars(self).items():
3583
3720
  property_name = name[1:]
@@ -8481,6 +8618,9 @@ AirWayBill -- 航空运单识别模板
8481
8618
  Table -- 表格模版
8482
8619
  SteelLabel -- 实物标签识别模板
8483
8620
  CarInsurance -- 车辆保险单识别模板
8621
+ MultiRealEstateCertificate -- 房产材料识别模板
8622
+ MultiRealEstateMaterial -- 房产证明识别模板
8623
+ HongKongUtilityBill -- 香港水电煤单识别模板
8484
8624
  :type ConfigId: str
8485
8625
  :param _EnableCoord: 是否开启全文字段坐标值的识别
8486
8626
  :type EnableCoord: bool
@@ -8488,6 +8628,9 @@ CarInsurance -- 车辆保险单识别模板
8488
8628
  :type OutputParentKey: bool
8489
8629
  :param _ConfigAdvanced: 模版的单个属性配置
8490
8630
  :type ConfigAdvanced: :class:`tencentcloud.ocr.v20181119.models.ConfigAdvanced`
8631
+ :param _OutputLanguage: cn时,添加的key为中文
8632
+ en时,添加的key为英语
8633
+ :type OutputLanguage: str
8491
8634
  """
8492
8635
  self._ImageUrl = None
8493
8636
  self._ImageBase64 = None
@@ -8499,6 +8642,7 @@ CarInsurance -- 车辆保险单识别模板
8499
8642
  self._EnableCoord = None
8500
8643
  self._OutputParentKey = None
8501
8644
  self._ConfigAdvanced = None
8645
+ self._OutputLanguage = None
8502
8646
 
8503
8647
  @property
8504
8648
  def ImageUrl(self):
@@ -8585,6 +8729,9 @@ AirWayBill -- 航空运单识别模板
8585
8729
  Table -- 表格模版
8586
8730
  SteelLabel -- 实物标签识别模板
8587
8731
  CarInsurance -- 车辆保险单识别模板
8732
+ MultiRealEstateCertificate -- 房产材料识别模板
8733
+ MultiRealEstateMaterial -- 房产证明识别模板
8734
+ HongKongUtilityBill -- 香港水电煤单识别模板
8588
8735
  :rtype: str
8589
8736
  """
8590
8737
  return self._ConfigId
@@ -8626,6 +8773,18 @@ CarInsurance -- 车辆保险单识别模板
8626
8773
  def ConfigAdvanced(self, ConfigAdvanced):
8627
8774
  self._ConfigAdvanced = ConfigAdvanced
8628
8775
 
8776
+ @property
8777
+ def OutputLanguage(self):
8778
+ """cn时,添加的key为中文
8779
+ en时,添加的key为英语
8780
+ :rtype: str
8781
+ """
8782
+ return self._OutputLanguage
8783
+
8784
+ @OutputLanguage.setter
8785
+ def OutputLanguage(self, OutputLanguage):
8786
+ self._OutputLanguage = OutputLanguage
8787
+
8629
8788
 
8630
8789
  def _deserialize(self, params):
8631
8790
  self._ImageUrl = params.get("ImageUrl")
@@ -8640,6 +8799,7 @@ CarInsurance -- 车辆保险单识别模板
8640
8799
  if params.get("ConfigAdvanced") is not None:
8641
8800
  self._ConfigAdvanced = ConfigAdvanced()
8642
8801
  self._ConfigAdvanced._deserialize(params.get("ConfigAdvanced"))
8802
+ self._OutputLanguage = params.get("OutputLanguage")
8643
8803
  memeber_set = set(params.keys())
8644
8804
  for name, value in vars(self).items():
8645
8805
  property_name = name[1:]
@@ -11301,16 +11461,9 @@ class GeneralHandwritingOCRRequest(AbstractModel):
11301
11461
 
11302
11462
  def __init__(self):
11303
11463
  r"""
11304
- :param _ImageBase64: 图片的 Base64 值。
11305
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11306
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。
11307
- 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
11464
+ :param _ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
11308
11465
  :type ImageBase64: str
11309
- :param _ImageUrl: 图片的 Url 地址。
11310
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11311
- 支持的图片大小:所下载图片经 Base64 编码后不超过7M。图片下载时间不超过 3 秒。
11312
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
11313
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
11466
+ :param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
11314
11467
  :type ImageUrl: str
11315
11468
  :param _Scene: 场景字段,默认不用填写。
11316
11469
  可选值:only_hw 表示只输出手写体识别结果,过滤印刷体。
@@ -11329,10 +11482,7 @@ class GeneralHandwritingOCRRequest(AbstractModel):
11329
11482
 
11330
11483
  @property
11331
11484
  def ImageBase64(self):
11332
- """图片的 Base64 值。
11333
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11334
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。
11335
- 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
11485
+ """图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
11336
11486
  :rtype: str
11337
11487
  """
11338
11488
  return self._ImageBase64
@@ -11343,11 +11493,7 @@ class GeneralHandwritingOCRRequest(AbstractModel):
11343
11493
 
11344
11494
  @property
11345
11495
  def ImageUrl(self):
11346
- """图片的 Url 地址。
11347
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11348
- 支持的图片大小:所下载图片经 Base64 编码后不超过7M。图片下载时间不超过 3 秒。
11349
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
11350
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
11496
+ """图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
11351
11497
  :rtype: str
11352
11498
  """
11353
11499
  return self._ImageUrl
@@ -11950,15 +12096,9 @@ class HKIDCardOCRRequest(AbstractModel):
11950
12096
  :type ReturnHeadImage: bool
11951
12097
  :param _DetectFake: 是否鉴伪。
11952
12098
  :type DetectFake: bool
11953
- :param _ImageBase64: 图片的 Base64 值。
11954
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11955
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
12099
+ :param _ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。
11956
12100
  :type ImageBase64: str
11957
- :param _ImageUrl: 图片的 Url 地址。
11958
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11959
- 支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
11960
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
11961
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
12101
+ :param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
11962
12102
  :type ImageUrl: str
11963
12103
  """
11964
12104
  self._ReturnHeadImage = None
@@ -11994,9 +12134,7 @@ class HKIDCardOCRRequest(AbstractModel):
11994
12134
 
11995
12135
  @property
11996
12136
  def ImageBase64(self):
11997
- """图片的 Base64 值。
11998
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
11999
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
12137
+ """图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。
12000
12138
  :rtype: str
12001
12139
  """
12002
12140
  return self._ImageBase64
@@ -12007,11 +12145,7 @@ class HKIDCardOCRRequest(AbstractModel):
12007
12145
 
12008
12146
  @property
12009
12147
  def ImageUrl(self):
12010
- """图片的 Url 地址。
12011
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
12012
- 支持的图片大小:所下载图片经 Base64 编码后不超过 3M。图片下载时间不超过 3 秒。
12013
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
12014
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
12148
+ """图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
12015
12149
  :rtype: str
12016
12150
  """
12017
12151
  return self._ImageUrl
@@ -12072,12 +12206,14 @@ class HKIDCardOCRResponse(AbstractModel):
12072
12206
  2:真。
12073
12207
  注意:此字段可能返回 null,表示取不到有效值。
12074
12208
  :type FakeDetectResult: int
12075
- :param _HeadImage: 人像照片Base64后的结果
12209
+ :param _HeadImage: Base64编码的证件左侧人像大图
12076
12210
  注意:此字段可能返回 null,表示取不到有效值。
12077
12211
  :type HeadImage: str
12078
- :param _WarningCode: 多重告警码,当身份证是翻拍、复印件时返回对应告警码。
12079
- -9102:证照复印件告警
12080
- -9103:证照翻拍告警
12212
+ :param _SmallHeadImage: Base64编码的证件右侧人像小图
12213
+ 注意:此字段可能返回 null,表示取不到有效值。
12214
+ :type SmallHeadImage: str
12215
+ :param _WarningCode: 该字段已废弃, 将固定返回空数组,不建议使用。
12216
+ This field is deprecated and will always return an empty array. Usage is not recommended.
12081
12217
  :type WarningCode: list of int
12082
12218
  :param _WarnCardInfos: 告警码
12083
12219
  -9101 证件边框不完整告警
@@ -12088,6 +12224,8 @@ class HKIDCardOCRResponse(AbstractModel):
12088
12224
  -9108 证件模糊告警
12089
12225
  -9109 告警能力未开通
12090
12226
  :type WarnCardInfos: list of int
12227
+ :param _WindowEmbeddedText: 证件透明视窗内的文本信息
12228
+ :type WindowEmbeddedText: str
12091
12229
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12092
12230
  :type RequestId: str
12093
12231
  """
@@ -12103,8 +12241,10 @@ class HKIDCardOCRResponse(AbstractModel):
12103
12241
  self._CurrentIssueDate = None
12104
12242
  self._FakeDetectResult = None
12105
12243
  self._HeadImage = None
12244
+ self._SmallHeadImage = None
12106
12245
  self._WarningCode = None
12107
12246
  self._WarnCardInfos = None
12247
+ self._WindowEmbeddedText = None
12108
12248
  self._RequestId = None
12109
12249
 
12110
12250
  @property
@@ -12241,7 +12381,7 @@ class HKIDCardOCRResponse(AbstractModel):
12241
12381
 
12242
12382
  @property
12243
12383
  def HeadImage(self):
12244
- """人像照片Base64后的结果
12384
+ """Base64编码的证件左侧人像大图
12245
12385
  注意:此字段可能返回 null,表示取不到有效值。
12246
12386
  :rtype: str
12247
12387
  """
@@ -12251,13 +12391,24 @@ class HKIDCardOCRResponse(AbstractModel):
12251
12391
  def HeadImage(self, HeadImage):
12252
12392
  self._HeadImage = HeadImage
12253
12393
 
12394
+ @property
12395
+ def SmallHeadImage(self):
12396
+ """Base64编码的证件右侧人像小图
12397
+ 注意:此字段可能返回 null,表示取不到有效值。
12398
+ :rtype: str
12399
+ """
12400
+ return self._SmallHeadImage
12401
+
12402
+ @SmallHeadImage.setter
12403
+ def SmallHeadImage(self, SmallHeadImage):
12404
+ self._SmallHeadImage = SmallHeadImage
12405
+
12254
12406
  @property
12255
12407
  def WarningCode(self):
12256
12408
  warnings.warn("parameter `WarningCode` is deprecated", DeprecationWarning)
12257
12409
 
12258
- """多重告警码,当身份证是翻拍、复印件时返回对应告警码。
12259
- -9102:证照复印件告警
12260
- -9103:证照翻拍告警
12410
+ """该字段已废弃, 将固定返回空数组,不建议使用。
12411
+ This field is deprecated and will always return an empty array. Usage is not recommended.
12261
12412
  :rtype: list of int
12262
12413
  """
12263
12414
  return self._WarningCode
@@ -12286,6 +12437,17 @@ class HKIDCardOCRResponse(AbstractModel):
12286
12437
  def WarnCardInfos(self, WarnCardInfos):
12287
12438
  self._WarnCardInfos = WarnCardInfos
12288
12439
 
12440
+ @property
12441
+ def WindowEmbeddedText(self):
12442
+ """证件透明视窗内的文本信息
12443
+ :rtype: str
12444
+ """
12445
+ return self._WindowEmbeddedText
12446
+
12447
+ @WindowEmbeddedText.setter
12448
+ def WindowEmbeddedText(self, WindowEmbeddedText):
12449
+ self._WindowEmbeddedText = WindowEmbeddedText
12450
+
12289
12451
  @property
12290
12452
  def RequestId(self):
12291
12453
  """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -12311,8 +12473,10 @@ class HKIDCardOCRResponse(AbstractModel):
12311
12473
  self._CurrentIssueDate = params.get("CurrentIssueDate")
12312
12474
  self._FakeDetectResult = params.get("FakeDetectResult")
12313
12475
  self._HeadImage = params.get("HeadImage")
12476
+ self._SmallHeadImage = params.get("SmallHeadImage")
12314
12477
  self._WarningCode = params.get("WarningCode")
12315
12478
  self._WarnCardInfos = params.get("WarnCardInfos")
12479
+ self._WindowEmbeddedText = params.get("WindowEmbeddedText")
12316
12480
  self._RequestId = params.get("RequestId")
12317
12481
 
12318
12482
 
@@ -15726,19 +15890,13 @@ class MLIDCardOCRRequest(AbstractModel):
15726
15890
 
15727
15891
  def __init__(self):
15728
15892
  r"""
15729
- :param _ImageBase64: 图片的 Base64 值。
15730
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
15731
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
15893
+ :param _ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。
15732
15894
  :type ImageBase64: str
15733
- :param _BackImageBase64: 卡证背面图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
15895
+ :param _BackImageBase64: 卡证背面图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
15734
15896
  :type BackImageBase64: str
15735
- :param _ImageUrl: 图片的 Url 地址。( 中国地区之外不支持这个字段 )
15736
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
15737
- 支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。
15738
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
15739
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15897
+ :param _ImageUrl: 图片的 Url 地址。( 中国地区之外不支持这个字段 )支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15740
15898
  :type ImageUrl: str
15741
- :param _BackImageUrl: 卡证背面图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15899
+ :param _BackImageUrl: 卡证背面图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15742
15900
  :type BackImageUrl: str
15743
15901
  :param _RetImage: 是否返回图片,默认false
15744
15902
  :type RetImage: bool
@@ -15751,9 +15909,7 @@ class MLIDCardOCRRequest(AbstractModel):
15751
15909
 
15752
15910
  @property
15753
15911
  def ImageBase64(self):
15754
- """图片的 Base64 值。
15755
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
15756
- 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
15912
+ """图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。
15757
15913
  :rtype: str
15758
15914
  """
15759
15915
  return self._ImageBase64
@@ -15764,7 +15920,7 @@ class MLIDCardOCRRequest(AbstractModel):
15764
15920
 
15765
15921
  @property
15766
15922
  def BackImageBase64(self):
15767
- """卡证背面图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
15923
+ """卡证背面图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
15768
15924
  :rtype: str
15769
15925
  """
15770
15926
  return self._BackImageBase64
@@ -15775,11 +15931,7 @@ class MLIDCardOCRRequest(AbstractModel):
15775
15931
 
15776
15932
  @property
15777
15933
  def ImageUrl(self):
15778
- """图片的 Url 地址。( 中国地区之外不支持这个字段 )
15779
- 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
15780
- 支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。
15781
- 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
15782
- 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15934
+ """图片的 Url 地址。( 中国地区之外不支持这个字段 )支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15783
15935
  :rtype: str
15784
15936
  """
15785
15937
  return self._ImageUrl
@@ -15790,7 +15942,7 @@ class MLIDCardOCRRequest(AbstractModel):
15790
15942
 
15791
15943
  @property
15792
15944
  def BackImageUrl(self):
15793
- """卡证背面图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15945
+ """卡证背面图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
15794
15946
  :rtype: str
15795
15947
  """
15796
15948
  return self._BackImageUrl
@@ -15842,21 +15994,11 @@ class MLIDCardOCRResponse(AbstractModel):
15842
15994
  :type Address: str
15843
15995
  :param _Sex: 性别
15844
15996
  :type Sex: str
15845
- :param _Warn: 告警码
15846
- -9103 证照翻拍告警
15847
- -9102 证照复印件告警
15848
- -9106 证件遮挡告警
15849
- -9107 模糊图片告警
15997
+ :param _Warn: 该字段已废弃, 将固定返回空数组,不建议使用。
15850
15998
  :type Warn: list of int
15851
15999
  :param _Image: 证件图片
15852
16000
  :type Image: str
15853
- :param _AdvancedInfo: 此字段为扩展字段。
15854
- 返回字段识别结果的置信度,格式如下
15855
- {
15856
- 字段名:{
15857
- Confidence:0.9999
15858
- }
15859
- }
16001
+ :param _AdvancedInfo: 该字段已废弃, 将固定返回"1",不建议使用。
15860
16002
  :type AdvancedInfo: str
15861
16003
  :param _Type: 证件类型
15862
16004
  MyKad 身份证
@@ -15944,11 +16086,7 @@ MyKid 儿童卡
15944
16086
  def Warn(self):
15945
16087
  warnings.warn("parameter `Warn` is deprecated", DeprecationWarning)
15946
16088
 
15947
- """告警码
15948
- -9103 证照翻拍告警
15949
- -9102 证照复印件告警
15950
- -9106 证件遮挡告警
15951
- -9107 模糊图片告警
16089
+ """该字段已废弃, 将固定返回空数组,不建议使用。
15952
16090
  :rtype: list of int
15953
16091
  """
15954
16092
  return self._Warn
@@ -15972,19 +16110,17 @@ MyKid 儿童卡
15972
16110
 
15973
16111
  @property
15974
16112
  def AdvancedInfo(self):
15975
- """此字段为扩展字段。
15976
- 返回字段识别结果的置信度,格式如下
15977
- {
15978
- 字段名:{
15979
- Confidence:0.9999
15980
- }
15981
- }
16113
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
16114
+
16115
+ """该字段已废弃, 将固定返回"1",不建议使用。
15982
16116
  :rtype: str
15983
16117
  """
15984
16118
  return self._AdvancedInfo
15985
16119
 
15986
16120
  @AdvancedInfo.setter
15987
16121
  def AdvancedInfo(self, AdvancedInfo):
16122
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
16123
+
15988
16124
  self._AdvancedInfo = AdvancedInfo
15989
16125
 
15990
16126
  @property
@@ -16079,11 +16215,11 @@ class MLIDPassportOCRRequest(AbstractModel):
16079
16215
 
16080
16216
  def __init__(self):
16081
16217
  r"""
16082
- :param _ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。
16218
+ :param _ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 10M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。
16083
16219
  :type ImageBase64: str
16084
16220
  :param _RetImage: 是否返回图片,默认false
16085
16221
  :type RetImage: bool
16086
- :param _ImageUrl: 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
16222
+ :param _ImageUrl: 图片的 Url 地址。要求图片经Base64编码后不超过 10M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
16087
16223
  :type ImageUrl: str
16088
16224
  """
16089
16225
  self._ImageBase64 = None
@@ -16092,7 +16228,7 @@ class MLIDPassportOCRRequest(AbstractModel):
16092
16228
 
16093
16229
  @property
16094
16230
  def ImageBase64(self):
16095
- """图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。
16231
+ """图片的 Base64 值。要求图片经Base64编码后不超过 10M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。
16096
16232
  :rtype: str
16097
16233
  """
16098
16234
  return self._ImageBase64
@@ -16114,7 +16250,7 @@ class MLIDPassportOCRRequest(AbstractModel):
16114
16250
 
16115
16251
  @property
16116
16252
  def ImageUrl(self):
16117
- """图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
16253
+ """图片的 Url 地址。要求图片经Base64编码后不超过 10M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
16118
16254
  :rtype: str
16119
16255
  """
16120
16256
  return self._ImageUrl
@@ -16159,22 +16295,13 @@ class MLIDPassportOCRResponse(AbstractModel):
16159
16295
  :type IssuingCountry: str
16160
16296
  :param _Nationality: 国家地区代码(机读码区的解析结果)
16161
16297
  :type Nationality: str
16162
- :param _Warn: 告警码:
16163
- -9103 证照翻拍告警
16164
- -9102 证照复印件告警(包括黑白复印件、彩色复印件)
16165
- -9106 证件遮挡告警
16298
+ :param _Warn: 该字段已废弃, 将固定返回空数组,不建议使用。
16299
+
16166
16300
  :type Warn: list of int
16167
16301
  :param _Image: 证件中的人像图片base64
16168
16302
  :type Image: str
16169
- :param _AdvancedInfo: 扩展字段:
16170
- {
16171
- ID:{
16172
- Confidence:0.9999
16173
- },
16174
- Name:{
16175
- Confidence:0.9996
16176
- }
16177
- }
16303
+ :param _AdvancedInfo: 该字段已废弃, 将固定返回"1",不建议使用。
16304
+
16178
16305
  :type AdvancedInfo: str
16179
16306
  :param _CodeSet: 最下方第一行 MRZ Code 序列
16180
16307
  :type CodeSet: str
@@ -16199,6 +16326,8 @@ class MLIDPassportOCRResponse(AbstractModel):
16199
16326
  -9108 证件模糊告警
16200
16327
  -9109 告警能力未开通
16201
16328
  :type WarnCardInfos: list of int
16329
+ :param _CardCount: 输入图片中的卡证数量(仅请求曼谷地域[ap-bangkok]返回)
16330
+ :type CardCount: int
16202
16331
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
16203
16332
  :type RequestId: str
16204
16333
  """
@@ -16219,6 +16348,7 @@ class MLIDPassportOCRResponse(AbstractModel):
16219
16348
  self._Type = None
16220
16349
  self._PassportRecognizeInfos = None
16221
16350
  self._WarnCardInfos = None
16351
+ self._CardCount = None
16222
16352
  self._RequestId = None
16223
16353
 
16224
16354
  @property
@@ -16300,16 +16430,18 @@ class MLIDPassportOCRResponse(AbstractModel):
16300
16430
 
16301
16431
  @property
16302
16432
  def Warn(self):
16303
- """告警码:
16304
- -9103 证照翻拍告警
16305
- -9102 证照复印件告警(包括黑白复印件、彩色复印件)
16306
- -9106 证件遮挡告警
16433
+ warnings.warn("parameter `Warn` is deprecated", DeprecationWarning)
16434
+
16435
+ """该字段已废弃, 将固定返回空数组,不建议使用。
16436
+
16307
16437
  :rtype: list of int
16308
16438
  """
16309
16439
  return self._Warn
16310
16440
 
16311
16441
  @Warn.setter
16312
16442
  def Warn(self, Warn):
16443
+ warnings.warn("parameter `Warn` is deprecated", DeprecationWarning)
16444
+
16313
16445
  self._Warn = Warn
16314
16446
 
16315
16447
  @property
@@ -16325,21 +16457,18 @@ class MLIDPassportOCRResponse(AbstractModel):
16325
16457
 
16326
16458
  @property
16327
16459
  def AdvancedInfo(self):
16328
- """扩展字段:
16329
- {
16330
- ID:{
16331
- Confidence:0.9999
16332
- },
16333
- Name:{
16334
- Confidence:0.9996
16335
- }
16336
- }
16460
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
16461
+
16462
+ """该字段已废弃, 将固定返回"1",不建议使用。
16463
+
16337
16464
  :rtype: str
16338
16465
  """
16339
16466
  return self._AdvancedInfo
16340
16467
 
16341
16468
  @AdvancedInfo.setter
16342
16469
  def AdvancedInfo(self, AdvancedInfo):
16470
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
16471
+
16343
16472
  self._AdvancedInfo = AdvancedInfo
16344
16473
 
16345
16474
  @property
@@ -16428,6 +16557,17 @@ class MLIDPassportOCRResponse(AbstractModel):
16428
16557
  def WarnCardInfos(self, WarnCardInfos):
16429
16558
  self._WarnCardInfos = WarnCardInfos
16430
16559
 
16560
+ @property
16561
+ def CardCount(self):
16562
+ """输入图片中的卡证数量(仅请求曼谷地域[ap-bangkok]返回)
16563
+ :rtype: int
16564
+ """
16565
+ return self._CardCount
16566
+
16567
+ @CardCount.setter
16568
+ def CardCount(self, CardCount):
16569
+ self._CardCount = CardCount
16570
+
16431
16571
  @property
16432
16572
  def RequestId(self):
16433
16573
  """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -16460,6 +16600,7 @@ class MLIDPassportOCRResponse(AbstractModel):
16460
16600
  self._PassportRecognizeInfos = PassportRecognizeInfos()
16461
16601
  self._PassportRecognizeInfos._deserialize(params.get("PassportRecognizeInfos"))
16462
16602
  self._WarnCardInfos = params.get("WarnCardInfos")
16603
+ self._CardCount = params.get("CardCount")
16463
16604
  self._RequestId = params.get("RequestId")
16464
16605
 
16465
16606
 
@@ -26042,6 +26183,153 @@ class RecognizeTableAccurateOCRResponse(AbstractModel):
26042
26183
  self._RequestId = params.get("RequestId")
26043
26184
 
26044
26185
 
26186
+ class RecognizeTableMultiOCRRequest(AbstractModel):
26187
+ """RecognizeTableMultiOCR请求参数结构体
26188
+
26189
+ """
26190
+
26191
+ def __init__(self):
26192
+ r"""
26193
+ :param _ImageBase64: 图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
26194
+ :type ImageBase64: str
26195
+ :param _ImageUrl: 图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
26196
+ :type ImageUrl: str
26197
+ :param _PdfStartPageNumber: 文档的起始页码。 当传入文件是PDF型时,用来指定识别的起始页码,识别的页码包含当前值。
26198
+ :type PdfStartPageNumber: int
26199
+ :param _PdfEndPageNumber: 文档的结束页码。 当传入文件是PDF类型时,用来指定识别的结束页码,识别的页码包含当前值。单次调用最多支持识别3页内容,即PdfEndPageNumber-PdfStartPageNumber需要不大于3。
26200
+ :type PdfEndPageNumber: int
26201
+ :param _DataFormat: 配置选项,支持配置输出数据格式。
26202
+
26203
+ * **Mdbase64** 返回 base64 编码的 markdown 格式文本。
26204
+ * **Excelbase64** 返回 base64 编码的 excel 文件。
26205
+ :type DataFormat: str
26206
+ """
26207
+ self._ImageBase64 = None
26208
+ self._ImageUrl = None
26209
+ self._PdfStartPageNumber = None
26210
+ self._PdfEndPageNumber = None
26211
+ self._DataFormat = None
26212
+
26213
+ @property
26214
+ def ImageBase64(self):
26215
+ """图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
26216
+ :rtype: str
26217
+ """
26218
+ return self._ImageBase64
26219
+
26220
+ @ImageBase64.setter
26221
+ def ImageBase64(self, ImageBase64):
26222
+ self._ImageBase64 = ImageBase64
26223
+
26224
+ @property
26225
+ def ImageUrl(self):
26226
+ """图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
26227
+ :rtype: str
26228
+ """
26229
+ return self._ImageUrl
26230
+
26231
+ @ImageUrl.setter
26232
+ def ImageUrl(self, ImageUrl):
26233
+ self._ImageUrl = ImageUrl
26234
+
26235
+ @property
26236
+ def PdfStartPageNumber(self):
26237
+ """文档的起始页码。 当传入文件是PDF型时,用来指定识别的起始页码,识别的页码包含当前值。
26238
+ :rtype: int
26239
+ """
26240
+ return self._PdfStartPageNumber
26241
+
26242
+ @PdfStartPageNumber.setter
26243
+ def PdfStartPageNumber(self, PdfStartPageNumber):
26244
+ self._PdfStartPageNumber = PdfStartPageNumber
26245
+
26246
+ @property
26247
+ def PdfEndPageNumber(self):
26248
+ """文档的结束页码。 当传入文件是PDF类型时,用来指定识别的结束页码,识别的页码包含当前值。单次调用最多支持识别3页内容,即PdfEndPageNumber-PdfStartPageNumber需要不大于3。
26249
+ :rtype: int
26250
+ """
26251
+ return self._PdfEndPageNumber
26252
+
26253
+ @PdfEndPageNumber.setter
26254
+ def PdfEndPageNumber(self, PdfEndPageNumber):
26255
+ self._PdfEndPageNumber = PdfEndPageNumber
26256
+
26257
+ @property
26258
+ def DataFormat(self):
26259
+ """配置选项,支持配置输出数据格式。
26260
+
26261
+ * **Mdbase64** 返回 base64 编码的 markdown 格式文本。
26262
+ * **Excelbase64** 返回 base64 编码的 excel 文件。
26263
+ :rtype: str
26264
+ """
26265
+ return self._DataFormat
26266
+
26267
+ @DataFormat.setter
26268
+ def DataFormat(self, DataFormat):
26269
+ self._DataFormat = DataFormat
26270
+
26271
+
26272
+ def _deserialize(self, params):
26273
+ self._ImageBase64 = params.get("ImageBase64")
26274
+ self._ImageUrl = params.get("ImageUrl")
26275
+ self._PdfStartPageNumber = params.get("PdfStartPageNumber")
26276
+ self._PdfEndPageNumber = params.get("PdfEndPageNumber")
26277
+ self._DataFormat = params.get("DataFormat")
26278
+ memeber_set = set(params.keys())
26279
+ for name, value in vars(self).items():
26280
+ property_name = name[1:]
26281
+ if property_name in memeber_set:
26282
+ memeber_set.remove(property_name)
26283
+ if len(memeber_set) > 0:
26284
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
26285
+
26286
+
26287
+
26288
+ class RecognizeTableMultiOCRResponse(AbstractModel):
26289
+ """RecognizeTableMultiOCR返回参数结构体
26290
+
26291
+ """
26292
+
26293
+ def __init__(self):
26294
+ r"""
26295
+ :param _DataBase64: Base64 编码后的 Excel 数据或 Markdown 数据。 注意:此字段可能返回空,表示取不到有效值。
26296
+ 注意:此字段可能返回 null,表示取不到有效值。
26297
+ :type DataBase64: str
26298
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
26299
+ :type RequestId: str
26300
+ """
26301
+ self._DataBase64 = None
26302
+ self._RequestId = None
26303
+
26304
+ @property
26305
+ def DataBase64(self):
26306
+ """Base64 编码后的 Excel 数据或 Markdown 数据。 注意:此字段可能返回空,表示取不到有效值。
26307
+ 注意:此字段可能返回 null,表示取不到有效值。
26308
+ :rtype: str
26309
+ """
26310
+ return self._DataBase64
26311
+
26312
+ @DataBase64.setter
26313
+ def DataBase64(self, DataBase64):
26314
+ self._DataBase64 = DataBase64
26315
+
26316
+ @property
26317
+ def RequestId(self):
26318
+ """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
26319
+ :rtype: str
26320
+ """
26321
+ return self._RequestId
26322
+
26323
+ @RequestId.setter
26324
+ def RequestId(self, RequestId):
26325
+ self._RequestId = RequestId
26326
+
26327
+
26328
+ def _deserialize(self, params):
26329
+ self._DataBase64 = params.get("DataBase64")
26330
+ self._RequestId = params.get("RequestId")
26331
+
26332
+
26045
26333
  class RecognizeTableOCRRequest(AbstractModel):
26046
26334
  """RecognizeTableOCR请求参数结构体
26047
26335
 
@@ -26382,16 +26670,10 @@ class RecognizeThaiIDCardOCRResponse(AbstractModel):
26382
26670
  -9108 证件模糊告警
26383
26671
  -9109 告警能力未开通
26384
26672
  :type WarnCardInfos: list of int
26385
- :param _AdvancedInfo: 字段置信度:
26386
- {
26387
- "ID": {
26388
- "Confidence": 0.9999
26389
- },
26390
- "ThaiName": {
26391
- "Confidence": 0.9996
26392
- }
26393
- }
26673
+ :param _AdvancedInfo: 该字段已废弃, 将固定返回"1",不建议使用。
26394
26674
  :type AdvancedInfo: str
26675
+ :param _CardCount: 卡证正面图片中,证件主体的数量(仅请求曼谷地域[ap-bangkok]返回)
26676
+ :type CardCount: int
26395
26677
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
26396
26678
  :type RequestId: str
26397
26679
  """
@@ -26412,6 +26694,7 @@ class RecognizeThaiIDCardOCRResponse(AbstractModel):
26412
26694
  self._PortraitImage = None
26413
26695
  self._WarnCardInfos = None
26414
26696
  self._AdvancedInfo = None
26697
+ self._CardCount = None
26415
26698
  self._RequestId = None
26416
26699
 
26417
26700
  @property
@@ -26598,23 +26881,30 @@ class RecognizeThaiIDCardOCRResponse(AbstractModel):
26598
26881
 
26599
26882
  @property
26600
26883
  def AdvancedInfo(self):
26601
- """字段置信度:
26602
- {
26603
- "ID": {
26604
- "Confidence": 0.9999
26605
- },
26606
- "ThaiName": {
26607
- "Confidence": 0.9996
26608
- }
26609
- }
26884
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
26885
+
26886
+ """该字段已废弃, 将固定返回"1",不建议使用。
26610
26887
  :rtype: str
26611
26888
  """
26612
26889
  return self._AdvancedInfo
26613
26890
 
26614
26891
  @AdvancedInfo.setter
26615
26892
  def AdvancedInfo(self, AdvancedInfo):
26893
+ warnings.warn("parameter `AdvancedInfo` is deprecated", DeprecationWarning)
26894
+
26616
26895
  self._AdvancedInfo = AdvancedInfo
26617
26896
 
26897
+ @property
26898
+ def CardCount(self):
26899
+ """卡证正面图片中,证件主体的数量(仅请求曼谷地域[ap-bangkok]返回)
26900
+ :rtype: int
26901
+ """
26902
+ return self._CardCount
26903
+
26904
+ @CardCount.setter
26905
+ def CardCount(self, CardCount):
26906
+ self._CardCount = CardCount
26907
+
26618
26908
  @property
26619
26909
  def RequestId(self):
26620
26910
  """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -26645,6 +26935,7 @@ class RecognizeThaiIDCardOCRResponse(AbstractModel):
26645
26935
  self._PortraitImage = params.get("PortraitImage")
26646
26936
  self._WarnCardInfos = params.get("WarnCardInfos")
26647
26937
  self._AdvancedInfo = params.get("AdvancedInfo")
26938
+ self._CardCount = params.get("CardCount")
26648
26939
  self._RequestId = params.get("RequestId")
26649
26940
 
26650
26941
 
@@ -26844,6 +27135,8 @@ class RecognizeValidIDCardOCRRequest(AbstractModel):
26844
27135
  :type EnablePSCheck: bool
26845
27136
  :param _EnableWordCheck: 默认值为false,打开返回字段级反光和字段级完整性告警。类型为:临时、港澳台居住证、外国人居住证失效
26846
27137
  :type EnableWordCheck: bool
27138
+ :param _EnableQualityCheck: 默认值为false,打开返回证件是否模糊。
27139
+ :type EnableQualityCheck: bool
26847
27140
  """
26848
27141
  self._ImageBase64 = None
26849
27142
  self._ImageUrl = None
@@ -26856,6 +27149,7 @@ class RecognizeValidIDCardOCRRequest(AbstractModel):
26856
27149
  self._EnableReshootCheck = None
26857
27150
  self._EnablePSCheck = None
26858
27151
  self._EnableWordCheck = None
27152
+ self._EnableQualityCheck = None
26859
27153
 
26860
27154
  @property
26861
27155
  def ImageBase64(self):
@@ -26991,6 +27285,17 @@ class RecognizeValidIDCardOCRRequest(AbstractModel):
26991
27285
  def EnableWordCheck(self, EnableWordCheck):
26992
27286
  self._EnableWordCheck = EnableWordCheck
26993
27287
 
27288
+ @property
27289
+ def EnableQualityCheck(self):
27290
+ """默认值为false,打开返回证件是否模糊。
27291
+ :rtype: bool
27292
+ """
27293
+ return self._EnableQualityCheck
27294
+
27295
+ @EnableQualityCheck.setter
27296
+ def EnableQualityCheck(self, EnableQualityCheck):
27297
+ self._EnableQualityCheck = EnableQualityCheck
27298
+
26994
27299
 
26995
27300
  def _deserialize(self, params):
26996
27301
  self._ImageBase64 = params.get("ImageBase64")
@@ -27004,6 +27309,7 @@ class RecognizeValidIDCardOCRRequest(AbstractModel):
27004
27309
  self._EnableReshootCheck = params.get("EnableReshootCheck")
27005
27310
  self._EnablePSCheck = params.get("EnablePSCheck")
27006
27311
  self._EnableWordCheck = params.get("EnableWordCheck")
27312
+ self._EnableQualityCheck = params.get("EnableQualityCheck")
27007
27313
  memeber_set = set(params.keys())
27008
27314
  for name, value in vars(self).items():
27009
27315
  property_name = name[1:]
@@ -31224,9 +31530,12 @@ class TaxPayment(AbstractModel):
31224
31530
  税号 、纳税人识别号 、纳税人名称 、金额合计大写 、金额合计小写 、填发日期 、税务机关 、填票人。
31225
31531
  示例值:纳税人识别号
31226
31532
  :type Content: list of OtherInvoiceItem
31533
+ :param _TableItems: 表格。
31534
+ :type TableItems: list of OtherInvoiceList
31227
31535
  """
31228
31536
  self._Title = None
31229
31537
  self._Content = None
31538
+ self._TableItems = None
31230
31539
 
31231
31540
  @property
31232
31541
  def Title(self):
@@ -31252,6 +31561,17 @@ class TaxPayment(AbstractModel):
31252
31561
  def Content(self, Content):
31253
31562
  self._Content = Content
31254
31563
 
31564
+ @property
31565
+ def TableItems(self):
31566
+ """表格。
31567
+ :rtype: list of OtherInvoiceList
31568
+ """
31569
+ return self._TableItems
31570
+
31571
+ @TableItems.setter
31572
+ def TableItems(self, TableItems):
31573
+ self._TableItems = TableItems
31574
+
31255
31575
 
31256
31576
  def _deserialize(self, params):
31257
31577
  self._Title = params.get("Title")
@@ -31261,6 +31581,12 @@ class TaxPayment(AbstractModel):
31261
31581
  obj = OtherInvoiceItem()
31262
31582
  obj._deserialize(item)
31263
31583
  self._Content.append(obj)
31584
+ if params.get("TableItems") is not None:
31585
+ self._TableItems = []
31586
+ for item in params.get("TableItems"):
31587
+ obj = OtherInvoiceList()
31588
+ obj._deserialize(item)
31589
+ self._TableItems.append(obj)
31264
31590
  memeber_set = set(params.keys())
31265
31591
  for name, value in vars(self).items():
31266
31592
  property_name = name[1:]
@@ -895,7 +895,9 @@ class OcrClient(AbstractClient):
895
895
 
896
896
 
897
897
  def GeneralHandwritingOCR(self, request):
898
- """本接口支持图片内手写体文字的检测和识别,针对手写字体无规则、字迹潦草、模糊等特点进行了识别能力的增强。
898
+ """<b>此接口为通用手写体识别的旧版本服务,不再进行服务升级,建议您使用识别能力更强、服务性能更优的<a href="https://cloud.tencent.com/document/product/866/34937">通用印刷体识别(高精度)识别服务</a>。</b>
899
+
900
+ 本接口支持图片内手写体文字的检测和识别,针对手写字体无规则、字迹潦草、模糊等特点进行了识别能力的增强。
899
901
 
900
902
  默认接口请求频率限制:10次/秒。
901
903
 
@@ -2101,6 +2103,31 @@ class OcrClient(AbstractClient):
2101
2103
  raise TencentCloudSDKException(type(e).__name__, str(e))
2102
2104
 
2103
2105
 
2106
+ def RecognizeTableMultiOCR(self, request):
2107
+ """基于MLLM(多模态大语言模型)的表格识别能力,针对复杂表格的算法识别效果更佳,适配财务报表识别场景,并可输出直接对接业务系统的Excel数据。
2108
+
2109
+ 默认接口请求频率限制:1次/秒。
2110
+
2111
+ :param request: Request instance for RecognizeTableMultiOCR.
2112
+ :type request: :class:`tencentcloud.ocr.v20181119.models.RecognizeTableMultiOCRRequest`
2113
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.RecognizeTableMultiOCRResponse`
2114
+
2115
+ """
2116
+ try:
2117
+ params = request._serialize()
2118
+ headers = request.headers
2119
+ body = self.call("RecognizeTableMultiOCR", params, headers=headers)
2120
+ response = json.loads(body)
2121
+ model = models.RecognizeTableMultiOCRResponse()
2122
+ model._deserialize(response["Response"])
2123
+ return model
2124
+ except Exception as e:
2125
+ if isinstance(e, TencentCloudSDKException):
2126
+ raise
2127
+ else:
2128
+ raise TencentCloudSDKException(type(e).__name__, str(e))
2129
+
2130
+
2104
2131
  def RecognizeTableOCR(self, request):
2105
2132
  """本接口支持中英文图片/ PDF内常规表格、无线表格、多表格的检测和识别,支持日文有线表格识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。
2106
2133
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.0.1416
3
+ Version: 3.0.1433
4
4
  Summary: Tencent Cloud Ocr SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common (==3.0.1416)
18
+ Requires-Dist: tencentcloud-sdk-python-common (<4.0.0,>=3.0.1433)
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1,10 @@
1
+ tencentcloud/__init__.py,sha256=VO_dNxr2FCJjFdLeVdDw9jI3LY7N8KMneno9An9rlcI,631
2
+ tencentcloud/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ tencentcloud/ocr/v20181119/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ tencentcloud/ocr/v20181119/errorcodes.py,sha256=F14bbQDRi4P9JfBfjuTGaR08iiQkY3d3KcyBwscqAtk,6985
5
+ tencentcloud/ocr/v20181119/models.py,sha256=yEZw6PpbtRD6ewCZ5I0_iTNlCg-bOvhoYCmNOC_Yndo,1380220
6
+ tencentcloud/ocr/v20181119/ocr_client.py,sha256=D9rJ5NROJ6i0WjWIUXD0CvY_NTYq74un_lPz_o3DcKQ,123525
7
+ tencentcloud_sdk_python_ocr-3.0.1433.dist-info/METADATA,sha256=MQlrpa1D-tx4LUvpY4jysFGTanXedz00LB6MFfsal4A,1503
8
+ tencentcloud_sdk_python_ocr-3.0.1433.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
9
+ tencentcloud_sdk_python_ocr-3.0.1433.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
10
+ tencentcloud_sdk_python_ocr-3.0.1433.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- tencentcloud/__init__.py,sha256=-3wPg6USRRdvHHmZ1D-kvX873GrUeYC1aT5yHZA0Mk0,631
2
- tencentcloud/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- tencentcloud/ocr/v20181119/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- tencentcloud/ocr/v20181119/errorcodes.py,sha256=F14bbQDRi4P9JfBfjuTGaR08iiQkY3d3KcyBwscqAtk,6985
5
- tencentcloud/ocr/v20181119/models.py,sha256=wPHYZLb2mm2NcZxmAWOu2pAIHOrhu2E9i7zH3RvbQnQ,1364902
6
- tencentcloud/ocr/v20181119/ocr_client.py,sha256=Fzx5_ndb4zYO6XV6VfuOa6hF-hQolvpNw1p9LMni2mU,122127
7
- tencentcloud_sdk_python_ocr-3.0.1416.dist-info/METADATA,sha256=cFJ_Q2_uilFxtQzBoTPFraHQGBfNCW4dTh94nm5kUGI,1496
8
- tencentcloud_sdk_python_ocr-3.0.1416.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
9
- tencentcloud_sdk_python_ocr-3.0.1416.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
10
- tencentcloud_sdk_python_ocr-3.0.1416.dist-info/RECORD,,