tencentcloud-sdk-python-ocr 3.1.67__tar.gz → 3.1.74__tar.gz

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.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/v20181119/models.py +474 -6
  5. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/v20181119/ocr_client.py +52 -0
  6. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/v20181119/ocr_client_async.py +42 -0
  7. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_ocr-3.1.74/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_ocr-3.1.67/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/README.rst +0 -0
  11. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/__init__.py +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.67 → tencentcloud_sdk_python_ocr-3.1.74}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.67
3
+ Version: 3.1.74
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<4.0.0,>=3.1.67
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.74
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-ocr',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.67,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.74,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Ocr SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.67'
17
+ __version__ = '3.1.74'
@@ -4184,17 +4184,23 @@ class ClassifyStoreNameRequest(AbstractModel):
4184
4184
 
4185
4185
  def __init__(self):
4186
4186
  r"""
4187
- :param _ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl
4187
+ :param _ImageBase64: <p>图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4188
4188
  :type ImageBase64: str
4189
- :param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
4189
+ :param _ImageUrl: <p>图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4190
4190
  :type ImageUrl: str
4191
+ :param _SceneType: <p>是否输出具体场景标签。注:开启后耗时会增加。</p>
4192
+ :type SceneType: bool
4193
+ :param _StoreInfo: <p>输入商户名称,辅助判断具体场景标签。注:仅SceneType配置为true时支持。</p>
4194
+ :type StoreInfo: str
4191
4195
  """
4192
4196
  self._ImageBase64 = None
4193
4197
  self._ImageUrl = None
4198
+ self._SceneType = None
4199
+ self._StoreInfo = None
4194
4200
 
4195
4201
  @property
4196
4202
  def ImageBase64(self):
4197
- r"""图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl
4203
+ r"""<p>图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4198
4204
  :rtype: str
4199
4205
  """
4200
4206
  return self._ImageBase64
@@ -4205,7 +4211,7 @@ class ClassifyStoreNameRequest(AbstractModel):
4205
4211
 
4206
4212
  @property
4207
4213
  def ImageUrl(self):
4208
- r"""图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
4214
+ r"""<p>图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4209
4215
  :rtype: str
4210
4216
  """
4211
4217
  return self._ImageUrl
@@ -4214,10 +4220,34 @@ class ClassifyStoreNameRequest(AbstractModel):
4214
4220
  def ImageUrl(self, ImageUrl):
4215
4221
  self._ImageUrl = ImageUrl
4216
4222
 
4223
+ @property
4224
+ def SceneType(self):
4225
+ r"""<p>是否输出具体场景标签。注:开启后耗时会增加。</p>
4226
+ :rtype: bool
4227
+ """
4228
+ return self._SceneType
4229
+
4230
+ @SceneType.setter
4231
+ def SceneType(self, SceneType):
4232
+ self._SceneType = SceneType
4233
+
4234
+ @property
4235
+ def StoreInfo(self):
4236
+ r"""<p>输入商户名称,辅助判断具体场景标签。注:仅SceneType配置为true时支持。</p>
4237
+ :rtype: str
4238
+ """
4239
+ return self._StoreInfo
4240
+
4241
+ @StoreInfo.setter
4242
+ def StoreInfo(self, StoreInfo):
4243
+ self._StoreInfo = StoreInfo
4244
+
4217
4245
 
4218
4246
  def _deserialize(self, params):
4219
4247
  self._ImageBase64 = params.get("ImageBase64")
4220
4248
  self._ImageUrl = params.get("ImageUrl")
4249
+ self._SceneType = params.get("SceneType")
4250
+ self._StoreInfo = params.get("StoreInfo")
4221
4251
  memeber_set = set(params.keys())
4222
4252
  for name, value in vars(self).items():
4223
4253
  property_name = name[1:]
@@ -4235,17 +4265,20 @@ class ClassifyStoreNameResponse(AbstractModel):
4235
4265
 
4236
4266
  def __init__(self):
4237
4267
  r"""
4238
- :param _StoreLabel: 门头照标签
4268
+ :param _StoreLabel: <p>门头照标签</p>
4239
4269
  :type StoreLabel: list of str
4270
+ :param _SceneType: <p>具体场景标签,输出3个最匹配的场景, 注:仅SceneType配置为true时支持。</p>
4271
+ :type SceneType: str
4240
4272
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4241
4273
  :type RequestId: str
4242
4274
  """
4243
4275
  self._StoreLabel = None
4276
+ self._SceneType = None
4244
4277
  self._RequestId = None
4245
4278
 
4246
4279
  @property
4247
4280
  def StoreLabel(self):
4248
- r"""门头照标签
4281
+ r"""<p>门头照标签</p>
4249
4282
  :rtype: list of str
4250
4283
  """
4251
4284
  return self._StoreLabel
@@ -4254,6 +4287,17 @@ class ClassifyStoreNameResponse(AbstractModel):
4254
4287
  def StoreLabel(self, StoreLabel):
4255
4288
  self._StoreLabel = StoreLabel
4256
4289
 
4290
+ @property
4291
+ def SceneType(self):
4292
+ r"""<p>具体场景标签,输出3个最匹配的场景, 注:仅SceneType配置为true时支持。</p>
4293
+ :rtype: str
4294
+ """
4295
+ return self._SceneType
4296
+
4297
+ @SceneType.setter
4298
+ def SceneType(self, SceneType):
4299
+ self._SceneType = SceneType
4300
+
4257
4301
  @property
4258
4302
  def RequestId(self):
4259
4303
  r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -4268,6 +4312,7 @@ class ClassifyStoreNameResponse(AbstractModel):
4268
4312
 
4269
4313
  def _deserialize(self, params):
4270
4314
  self._StoreLabel = params.get("StoreLabel")
4315
+ self._SceneType = params.get("SceneType")
4271
4316
  self._RequestId = params.get("RequestId")
4272
4317
 
4273
4318
 
@@ -4485,6 +4530,252 @@ class Coord(AbstractModel):
4485
4530
 
4486
4531
 
4487
4532
 
4533
+ class CropEnhanceImageOCRRequest(AbstractModel):
4534
+ r"""CropEnhanceImageOCR请求参数结构体
4535
+
4536
+ """
4537
+
4538
+ def __init__(self):
4539
+ r"""
4540
+ :param _ImageBase64: <p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4541
+ :type ImageBase64: str
4542
+ :param _ImageUrl: <p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4543
+ :type ImageUrl: str
4544
+ :param _PdfPageNumber: <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4545
+ :type PdfPageNumber: int
4546
+ :param _Crop: <p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4547
+ :type Crop: int
4548
+ :param _Deskew: <p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4549
+ :type Deskew: int
4550
+ :param _OnlyPosition: <p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4551
+ :type OnlyPosition: int
4552
+ :param _EnhanceType: <p>默认-1</p><ul><li>-1 不处理增强</li><li>1 增亮</li><li>2 增强并锐化</li><li>3 黑白</li><li>4 灰度</li><li>5 去阴影增强</li><li>6 点阵图</li></ul>
4553
+ :type EnhanceType: int
4554
+ :param _AdjustOrientation: <p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4555
+ :type AdjustOrientation: int
4556
+ """
4557
+ self._ImageBase64 = None
4558
+ self._ImageUrl = None
4559
+ self._PdfPageNumber = None
4560
+ self._Crop = None
4561
+ self._Deskew = None
4562
+ self._OnlyPosition = None
4563
+ self._EnhanceType = None
4564
+ self._AdjustOrientation = None
4565
+
4566
+ @property
4567
+ def ImageBase64(self):
4568
+ r"""<p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4569
+ :rtype: str
4570
+ """
4571
+ return self._ImageBase64
4572
+
4573
+ @ImageBase64.setter
4574
+ def ImageBase64(self, ImageBase64):
4575
+ self._ImageBase64 = ImageBase64
4576
+
4577
+ @property
4578
+ def ImageUrl(self):
4579
+ r"""<p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4580
+ :rtype: str
4581
+ """
4582
+ return self._ImageUrl
4583
+
4584
+ @ImageUrl.setter
4585
+ def ImageUrl(self, ImageUrl):
4586
+ self._ImageUrl = ImageUrl
4587
+
4588
+ @property
4589
+ def PdfPageNumber(self):
4590
+ r"""<p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4591
+ :rtype: int
4592
+ """
4593
+ return self._PdfPageNumber
4594
+
4595
+ @PdfPageNumber.setter
4596
+ def PdfPageNumber(self, PdfPageNumber):
4597
+ self._PdfPageNumber = PdfPageNumber
4598
+
4599
+ @property
4600
+ def Crop(self):
4601
+ r"""<p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4602
+ :rtype: int
4603
+ """
4604
+ return self._Crop
4605
+
4606
+ @Crop.setter
4607
+ def Crop(self, Crop):
4608
+ self._Crop = Crop
4609
+
4610
+ @property
4611
+ def Deskew(self):
4612
+ r"""<p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4613
+ :rtype: int
4614
+ """
4615
+ return self._Deskew
4616
+
4617
+ @Deskew.setter
4618
+ def Deskew(self, Deskew):
4619
+ self._Deskew = Deskew
4620
+
4621
+ @property
4622
+ def OnlyPosition(self):
4623
+ r"""<p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4624
+ :rtype: int
4625
+ """
4626
+ return self._OnlyPosition
4627
+
4628
+ @OnlyPosition.setter
4629
+ def OnlyPosition(self, OnlyPosition):
4630
+ self._OnlyPosition = OnlyPosition
4631
+
4632
+ @property
4633
+ def EnhanceType(self):
4634
+ r"""<p>默认-1</p><ul><li>-1 不处理增强</li><li>1 增亮</li><li>2 增强并锐化</li><li>3 黑白</li><li>4 灰度</li><li>5 去阴影增强</li><li>6 点阵图</li></ul>
4635
+ :rtype: int
4636
+ """
4637
+ return self._EnhanceType
4638
+
4639
+ @EnhanceType.setter
4640
+ def EnhanceType(self, EnhanceType):
4641
+ self._EnhanceType = EnhanceType
4642
+
4643
+ @property
4644
+ def AdjustOrientation(self):
4645
+ r"""<p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4646
+ :rtype: int
4647
+ """
4648
+ return self._AdjustOrientation
4649
+
4650
+ @AdjustOrientation.setter
4651
+ def AdjustOrientation(self, AdjustOrientation):
4652
+ self._AdjustOrientation = AdjustOrientation
4653
+
4654
+
4655
+ def _deserialize(self, params):
4656
+ self._ImageBase64 = params.get("ImageBase64")
4657
+ self._ImageUrl = params.get("ImageUrl")
4658
+ self._PdfPageNumber = params.get("PdfPageNumber")
4659
+ self._Crop = params.get("Crop")
4660
+ self._Deskew = params.get("Deskew")
4661
+ self._OnlyPosition = params.get("OnlyPosition")
4662
+ self._EnhanceType = params.get("EnhanceType")
4663
+ self._AdjustOrientation = params.get("AdjustOrientation")
4664
+ memeber_set = set(params.keys())
4665
+ for name, value in vars(self).items():
4666
+ property_name = name[1:]
4667
+ if property_name in memeber_set:
4668
+ memeber_set.remove(property_name)
4669
+ if len(memeber_set) > 0:
4670
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4671
+
4672
+
4673
+
4674
+ class CropEnhanceImageOCRResponse(AbstractModel):
4675
+ r"""CropEnhanceImageOCR返回参数结构体
4676
+
4677
+ """
4678
+
4679
+ def __init__(self):
4680
+ r"""
4681
+ :param _CroppedWidth: <p>处理后图的宽</p>
4682
+ :type CroppedWidth: int
4683
+ :param _CroppedHeight: <p>处理后图的高</p>
4684
+ :type CroppedHeight: int
4685
+ :param _CroppedImage: <p>图像处理后的jpg图片,base64格式</p>
4686
+ :type CroppedImage: str
4687
+ :param _Position: <p>切图区域的4个角点坐标, 是个长度为8的数组<br>[0,1,2,3,4,5,6,7]</p><p>(0,1) 左上角坐标<br>(2,3) 右上角坐标<br>(4,5) 右下角坐标<br>(6,7) 左下角坐标</p>
4688
+ :type Position: list of int
4689
+ :param _Angle: <p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4690
+ 注意:此字段可能返回 null,表示取不到有效值。
4691
+ :type Angle: int
4692
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4693
+ :type RequestId: str
4694
+ """
4695
+ self._CroppedWidth = None
4696
+ self._CroppedHeight = None
4697
+ self._CroppedImage = None
4698
+ self._Position = None
4699
+ self._Angle = None
4700
+ self._RequestId = None
4701
+
4702
+ @property
4703
+ def CroppedWidth(self):
4704
+ r"""<p>处理后图的宽</p>
4705
+ :rtype: int
4706
+ """
4707
+ return self._CroppedWidth
4708
+
4709
+ @CroppedWidth.setter
4710
+ def CroppedWidth(self, CroppedWidth):
4711
+ self._CroppedWidth = CroppedWidth
4712
+
4713
+ @property
4714
+ def CroppedHeight(self):
4715
+ r"""<p>处理后图的高</p>
4716
+ :rtype: int
4717
+ """
4718
+ return self._CroppedHeight
4719
+
4720
+ @CroppedHeight.setter
4721
+ def CroppedHeight(self, CroppedHeight):
4722
+ self._CroppedHeight = CroppedHeight
4723
+
4724
+ @property
4725
+ def CroppedImage(self):
4726
+ r"""<p>图像处理后的jpg图片,base64格式</p>
4727
+ :rtype: str
4728
+ """
4729
+ return self._CroppedImage
4730
+
4731
+ @CroppedImage.setter
4732
+ def CroppedImage(self, CroppedImage):
4733
+ self._CroppedImage = CroppedImage
4734
+
4735
+ @property
4736
+ def Position(self):
4737
+ r"""<p>切图区域的4个角点坐标, 是个长度为8的数组<br>[0,1,2,3,4,5,6,7]</p><p>(0,1) 左上角坐标<br>(2,3) 右上角坐标<br>(4,5) 右下角坐标<br>(6,7) 左下角坐标</p>
4738
+ :rtype: list of int
4739
+ """
4740
+ return self._Position
4741
+
4742
+ @Position.setter
4743
+ def Position(self, Position):
4744
+ self._Position = Position
4745
+
4746
+ @property
4747
+ def Angle(self):
4748
+ r"""<p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4749
+ 注意:此字段可能返回 null,表示取不到有效值。
4750
+ :rtype: int
4751
+ """
4752
+ return self._Angle
4753
+
4754
+ @Angle.setter
4755
+ def Angle(self, Angle):
4756
+ self._Angle = Angle
4757
+
4758
+ @property
4759
+ def RequestId(self):
4760
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4761
+ :rtype: str
4762
+ """
4763
+ return self._RequestId
4764
+
4765
+ @RequestId.setter
4766
+ def RequestId(self, RequestId):
4767
+ self._RequestId = RequestId
4768
+
4769
+
4770
+ def _deserialize(self, params):
4771
+ self._CroppedWidth = params.get("CroppedWidth")
4772
+ self._CroppedHeight = params.get("CroppedHeight")
4773
+ self._CroppedImage = params.get("CroppedImage")
4774
+ self._Position = params.get("Position")
4775
+ self._Angle = params.get("Angle")
4776
+ self._RequestId = params.get("RequestId")
4777
+
4778
+
4488
4779
  class CustomsDeclaration(AbstractModel):
4489
4780
  r"""海关进/出口货物报关单
4490
4781
 
@@ -8677,6 +8968,183 @@ class EnterpriseLicenseOCRResponse(AbstractModel):
8677
8968
  self._RequestId = params.get("RequestId")
8678
8969
 
8679
8970
 
8971
+ class EraseHandwrittenImageOCRRequest(AbstractModel):
8972
+ r"""EraseHandwrittenImageOCR请求参数结构体
8973
+
8974
+ """
8975
+
8976
+ def __init__(self):
8977
+ r"""
8978
+ :param _ImageBase64: 图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8979
+ :type ImageBase64: str
8980
+ :param _ImageUrl: 图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8981
+ :type ImageUrl: str
8982
+ :param _PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
8983
+ :type PdfPageNumber: int
8984
+ :param _Crop: 0表示关闭切边,默认为0
8985
+ 1表示开启切边
8986
+ :type Crop: int
8987
+ :param _Deskew: 0表示关闭弯曲矫正,默认为0
8988
+ 1表示开启弯曲矫正
8989
+ :type Deskew: int
8990
+ :param _Sharpen: 0表示关闭增强锐化,默认为0
8991
+ 1表示开启增强锐化
8992
+ :type Sharpen: int
8993
+ :param _Grayscale: 0表示返回黑白图像
8994
+ 1表示返回彩色图像,默认为1
8995
+ :type Grayscale: int
8996
+ """
8997
+ self._ImageBase64 = None
8998
+ self._ImageUrl = None
8999
+ self._PdfPageNumber = None
9000
+ self._Crop = None
9001
+ self._Deskew = None
9002
+ self._Sharpen = None
9003
+ self._Grayscale = None
9004
+
9005
+ @property
9006
+ def ImageBase64(self):
9007
+ r"""图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
9008
+ :rtype: str
9009
+ """
9010
+ return self._ImageBase64
9011
+
9012
+ @ImageBase64.setter
9013
+ def ImageBase64(self, ImageBase64):
9014
+ self._ImageBase64 = ImageBase64
9015
+
9016
+ @property
9017
+ def ImageUrl(self):
9018
+ r"""图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
9019
+ :rtype: str
9020
+ """
9021
+ return self._ImageUrl
9022
+
9023
+ @ImageUrl.setter
9024
+ def ImageUrl(self, ImageUrl):
9025
+ self._ImageUrl = ImageUrl
9026
+
9027
+ @property
9028
+ def PdfPageNumber(self):
9029
+ r"""需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
9030
+ :rtype: int
9031
+ """
9032
+ return self._PdfPageNumber
9033
+
9034
+ @PdfPageNumber.setter
9035
+ def PdfPageNumber(self, PdfPageNumber):
9036
+ self._PdfPageNumber = PdfPageNumber
9037
+
9038
+ @property
9039
+ def Crop(self):
9040
+ r"""0表示关闭切边,默认为0
9041
+ 1表示开启切边
9042
+ :rtype: int
9043
+ """
9044
+ return self._Crop
9045
+
9046
+ @Crop.setter
9047
+ def Crop(self, Crop):
9048
+ self._Crop = Crop
9049
+
9050
+ @property
9051
+ def Deskew(self):
9052
+ r"""0表示关闭弯曲矫正,默认为0
9053
+ 1表示开启弯曲矫正
9054
+ :rtype: int
9055
+ """
9056
+ return self._Deskew
9057
+
9058
+ @Deskew.setter
9059
+ def Deskew(self, Deskew):
9060
+ self._Deskew = Deskew
9061
+
9062
+ @property
9063
+ def Sharpen(self):
9064
+ r"""0表示关闭增强锐化,默认为0
9065
+ 1表示开启增强锐化
9066
+ :rtype: int
9067
+ """
9068
+ return self._Sharpen
9069
+
9070
+ @Sharpen.setter
9071
+ def Sharpen(self, Sharpen):
9072
+ self._Sharpen = Sharpen
9073
+
9074
+ @property
9075
+ def Grayscale(self):
9076
+ r"""0表示返回黑白图像
9077
+ 1表示返回彩色图像,默认为1
9078
+ :rtype: int
9079
+ """
9080
+ return self._Grayscale
9081
+
9082
+ @Grayscale.setter
9083
+ def Grayscale(self, Grayscale):
9084
+ self._Grayscale = Grayscale
9085
+
9086
+
9087
+ def _deserialize(self, params):
9088
+ self._ImageBase64 = params.get("ImageBase64")
9089
+ self._ImageUrl = params.get("ImageUrl")
9090
+ self._PdfPageNumber = params.get("PdfPageNumber")
9091
+ self._Crop = params.get("Crop")
9092
+ self._Deskew = params.get("Deskew")
9093
+ self._Sharpen = params.get("Sharpen")
9094
+ self._Grayscale = params.get("Grayscale")
9095
+ memeber_set = set(params.keys())
9096
+ for name, value in vars(self).items():
9097
+ property_name = name[1:]
9098
+ if property_name in memeber_set:
9099
+ memeber_set.remove(property_name)
9100
+ if len(memeber_set) > 0:
9101
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
9102
+
9103
+
9104
+
9105
+ class EraseHandwrittenImageOCRResponse(AbstractModel):
9106
+ r"""EraseHandwrittenImageOCR返回参数结构体
9107
+
9108
+ """
9109
+
9110
+ def __init__(self):
9111
+ r"""
9112
+ :param _Image: 图像处理后的jpg图片,base64格式
9113
+ :type Image: str
9114
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9115
+ :type RequestId: str
9116
+ """
9117
+ self._Image = None
9118
+ self._RequestId = None
9119
+
9120
+ @property
9121
+ def Image(self):
9122
+ r"""图像处理后的jpg图片,base64格式
9123
+ :rtype: str
9124
+ """
9125
+ return self._Image
9126
+
9127
+ @Image.setter
9128
+ def Image(self, Image):
9129
+ self._Image = Image
9130
+
9131
+ @property
9132
+ def RequestId(self):
9133
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9134
+ :rtype: str
9135
+ """
9136
+ return self._RequestId
9137
+
9138
+ @RequestId.setter
9139
+ def RequestId(self, RequestId):
9140
+ self._RequestId = RequestId
9141
+
9142
+
9143
+ def _deserialize(self, params):
9144
+ self._Image = params.get("Image")
9145
+ self._RequestId = params.get("RequestId")
9146
+
9147
+
8680
9148
  class EstateCertOCRRequest(AbstractModel):
8681
9149
  r"""EstateCertOCR请求参数结构体
8682
9150
 
@@ -276,6 +276,31 @@ class OcrClient(AbstractClient):
276
276
  raise TencentCloudSDKException(type(e).__name__, str(e))
277
277
 
278
278
 
279
+ def CropEnhanceImageOCR(self, request):
280
+ r"""图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
281
+
282
+ 默认接口请求频率限制:5次/秒。
283
+
284
+ :param request: Request instance for CropEnhanceImageOCR.
285
+ :type request: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRRequest`
286
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRResponse`
287
+
288
+ """
289
+ try:
290
+ params = request._serialize()
291
+ headers = request.headers
292
+ body = self.call("CropEnhanceImageOCR", params, headers=headers)
293
+ response = json.loads(body)
294
+ model = models.CropEnhanceImageOCRResponse()
295
+ model._deserialize(response["Response"])
296
+ return model
297
+ except Exception as e:
298
+ if isinstance(e, TencentCloudSDKException):
299
+ raise
300
+ else:
301
+ raise TencentCloudSDKException(type(e).__name__, str(e))
302
+
303
+
279
304
  def DescribeExtractDocAgentJob(self, request):
280
305
  r"""模型参数更大,速度更慢。推荐场景:可以接受异步(超过30s返回),样本输入输出token大于2000,长文本类文档建议用异步模型。需要 SubmitExtractDocAgentJob(提交任务)、DescribeExtractDocAgentJob(查询任务)两个接口配套使用,计费发生在提交任务后。【备注:1.固定价格不限抽取字段数,2.自适应价格抽取字段大于10记两次费用,小于等于10记一次费用】
281
306
 
@@ -483,6 +508,31 @@ class OcrClient(AbstractClient):
483
508
  raise TencentCloudSDKException(type(e).__name__, str(e))
484
509
 
485
510
 
511
+ def EraseHandwrittenImageOCR(self, request):
512
+ r"""本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
513
+
514
+ 默认接口请求频率限制:5次/秒。
515
+
516
+ :param request: Request instance for EraseHandwrittenImageOCR.
517
+ :type request: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRRequest`
518
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRResponse`
519
+
520
+ """
521
+ try:
522
+ params = request._serialize()
523
+ headers = request.headers
524
+ body = self.call("EraseHandwrittenImageOCR", params, headers=headers)
525
+ response = json.loads(body)
526
+ model = models.EraseHandwrittenImageOCRResponse()
527
+ model._deserialize(response["Response"])
528
+ return model
529
+ except Exception as e:
530
+ if isinstance(e, TencentCloudSDKException):
531
+ raise
532
+ else:
533
+ raise TencentCloudSDKException(type(e).__name__, str(e))
534
+
535
+
486
536
  def EstateCertOCR(self, request):
487
537
  r"""本接口支持不动产权证关键字段的识别,包括使用期限、面积、用途、权利性质、权利类型、坐落、共有情况、权利人、权利其他状况等。
488
538
 
@@ -511,6 +561,8 @@ class OcrClient(AbstractClient):
511
561
  def ExtractDocAgent(self, request):
512
562
  r"""模型参数更小,速度更快。推荐场景:实时性要求高(30s以内)并且样本输入输出token2000以内,建议用实时模型。【备注:1.固定价格不限抽取字段数,2.自适应价格抽取字段大于10记两次费用,小于等于10记一次费用】
513
563
 
564
+ 默认接口请求频率限制:5次/秒。
565
+
514
566
  :param request: Request instance for ExtractDocAgent.
515
567
  :type request: :class:`tencentcloud.ocr.v20181119.models.ExtractDocAgentRequest`
516
568
  :rtype: :class:`tencentcloud.ocr.v20181119.models.ExtractDocAgentResponse`
@@ -225,6 +225,26 @@ class OcrClient(AbstractClient):
225
225
 
226
226
  return await self.call_and_deserialize(**kwargs)
227
227
 
228
+ async def CropEnhanceImageOCR(
229
+ self,
230
+ request: models.CropEnhanceImageOCRRequest,
231
+ opts: Dict = None,
232
+ ) -> models.CropEnhanceImageOCRResponse:
233
+ """
234
+ 图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
235
+
236
+ 默认接口请求频率限制:5次/秒。
237
+ """
238
+
239
+ kwargs = {}
240
+ kwargs["action"] = "CropEnhanceImageOCR"
241
+ kwargs["params"] = request._serialize()
242
+ kwargs["resp_cls"] = models.CropEnhanceImageOCRResponse
243
+ kwargs["headers"] = request.headers
244
+ kwargs["opts"] = opts or {}
245
+
246
+ return await self.call_and_deserialize(**kwargs)
247
+
228
248
  async def DescribeExtractDocAgentJob(
229
249
  self,
230
250
  request: models.DescribeExtractDocAgentJobRequest,
@@ -392,6 +412,26 @@ class OcrClient(AbstractClient):
392
412
 
393
413
  return await self.call_and_deserialize(**kwargs)
394
414
 
415
+ async def EraseHandwrittenImageOCR(
416
+ self,
417
+ request: models.EraseHandwrittenImageOCRRequest,
418
+ opts: Dict = None,
419
+ ) -> models.EraseHandwrittenImageOCRResponse:
420
+ """
421
+ 本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
422
+
423
+ 默认接口请求频率限制:5次/秒。
424
+ """
425
+
426
+ kwargs = {}
427
+ kwargs["action"] = "EraseHandwrittenImageOCR"
428
+ kwargs["params"] = request._serialize()
429
+ kwargs["resp_cls"] = models.EraseHandwrittenImageOCRResponse
430
+ kwargs["headers"] = request.headers
431
+ kwargs["opts"] = opts or {}
432
+
433
+ return await self.call_and_deserialize(**kwargs)
434
+
395
435
  async def EstateCertOCR(
396
436
  self,
397
437
  request: models.EstateCertOCRRequest,
@@ -419,6 +459,8 @@ class OcrClient(AbstractClient):
419
459
  ) -> models.ExtractDocAgentResponse:
420
460
  """
421
461
  模型参数更小,速度更快。推荐场景:实时性要求高(30s以内)并且样本输入输出token2000以内,建议用实时模型。【备注:1.固定价格不限抽取字段数,2.自适应价格抽取字段大于10记两次费用,小于等于10记一次费用】
462
+
463
+ 默认接口请求频率限制:5次/秒。
422
464
  """
423
465
 
424
466
  kwargs = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.67
3
+ Version: 3.1.74
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<4.0.0,>=3.1.67
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.74
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.74
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.67