tencentcloud-sdk-python-ocr 3.1.128__tar.gz → 3.1.130__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.128 → tencentcloud_sdk_python_ocr-3.1.130}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/v20181119/models.py +423 -0
  5. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/v20181119/ocr_client.py +50 -0
  6. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/v20181119/ocr_client_async.py +40 -0
  7. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_ocr-3.1.130/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_ocr-3.1.128/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/README.rst +0 -0
  11. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/__init__.py +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.128 → tencentcloud_sdk_python_ocr-3.1.130}/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.128
3
+ Version: 3.1.130
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.128
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.130
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.128,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.130,<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.128'
17
+ __version__ = '3.1.130'
@@ -4405,6 +4405,252 @@ class CoordList(AbstractModel):
4405
4405
 
4406
4406
 
4407
4407
 
4408
+ class CropEnhanceImageOCRRequest(AbstractModel):
4409
+ r"""CropEnhanceImageOCR请求参数结构体
4410
+
4411
+ """
4412
+
4413
+ def __init__(self):
4414
+ r"""
4415
+ :param _ImageBase64: <p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4416
+ :type ImageBase64: str
4417
+ :param _ImageUrl: <p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4418
+ :type ImageUrl: str
4419
+ :param _PdfPageNumber: <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4420
+ :type PdfPageNumber: int
4421
+ :param _Crop: <p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4422
+ :type Crop: int
4423
+ :param _Deskew: <p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4424
+ :type Deskew: int
4425
+ :param _OnlyPosition: <p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4426
+ :type OnlyPosition: int
4427
+ :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>
4428
+ :type EnhanceType: int
4429
+ :param _AdjustOrientation: <p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4430
+ :type AdjustOrientation: int
4431
+ """
4432
+ self._ImageBase64 = None
4433
+ self._ImageUrl = None
4434
+ self._PdfPageNumber = None
4435
+ self._Crop = None
4436
+ self._Deskew = None
4437
+ self._OnlyPosition = None
4438
+ self._EnhanceType = None
4439
+ self._AdjustOrientation = None
4440
+
4441
+ @property
4442
+ def ImageBase64(self):
4443
+ r"""<p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4444
+ :rtype: str
4445
+ """
4446
+ return self._ImageBase64
4447
+
4448
+ @ImageBase64.setter
4449
+ def ImageBase64(self, ImageBase64):
4450
+ self._ImageBase64 = ImageBase64
4451
+
4452
+ @property
4453
+ def ImageUrl(self):
4454
+ r"""<p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4455
+ :rtype: str
4456
+ """
4457
+ return self._ImageUrl
4458
+
4459
+ @ImageUrl.setter
4460
+ def ImageUrl(self, ImageUrl):
4461
+ self._ImageUrl = ImageUrl
4462
+
4463
+ @property
4464
+ def PdfPageNumber(self):
4465
+ r"""<p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4466
+ :rtype: int
4467
+ """
4468
+ return self._PdfPageNumber
4469
+
4470
+ @PdfPageNumber.setter
4471
+ def PdfPageNumber(self, PdfPageNumber):
4472
+ self._PdfPageNumber = PdfPageNumber
4473
+
4474
+ @property
4475
+ def Crop(self):
4476
+ r"""<p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4477
+ :rtype: int
4478
+ """
4479
+ return self._Crop
4480
+
4481
+ @Crop.setter
4482
+ def Crop(self, Crop):
4483
+ self._Crop = Crop
4484
+
4485
+ @property
4486
+ def Deskew(self):
4487
+ r"""<p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4488
+ :rtype: int
4489
+ """
4490
+ return self._Deskew
4491
+
4492
+ @Deskew.setter
4493
+ def Deskew(self, Deskew):
4494
+ self._Deskew = Deskew
4495
+
4496
+ @property
4497
+ def OnlyPosition(self):
4498
+ r"""<p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4499
+ :rtype: int
4500
+ """
4501
+ return self._OnlyPosition
4502
+
4503
+ @OnlyPosition.setter
4504
+ def OnlyPosition(self, OnlyPosition):
4505
+ self._OnlyPosition = OnlyPosition
4506
+
4507
+ @property
4508
+ def EnhanceType(self):
4509
+ 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>
4510
+ :rtype: int
4511
+ """
4512
+ return self._EnhanceType
4513
+
4514
+ @EnhanceType.setter
4515
+ def EnhanceType(self, EnhanceType):
4516
+ self._EnhanceType = EnhanceType
4517
+
4518
+ @property
4519
+ def AdjustOrientation(self):
4520
+ r"""<p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4521
+ :rtype: int
4522
+ """
4523
+ return self._AdjustOrientation
4524
+
4525
+ @AdjustOrientation.setter
4526
+ def AdjustOrientation(self, AdjustOrientation):
4527
+ self._AdjustOrientation = AdjustOrientation
4528
+
4529
+
4530
+ def _deserialize(self, params):
4531
+ self._ImageBase64 = params.get("ImageBase64")
4532
+ self._ImageUrl = params.get("ImageUrl")
4533
+ self._PdfPageNumber = params.get("PdfPageNumber")
4534
+ self._Crop = params.get("Crop")
4535
+ self._Deskew = params.get("Deskew")
4536
+ self._OnlyPosition = params.get("OnlyPosition")
4537
+ self._EnhanceType = params.get("EnhanceType")
4538
+ self._AdjustOrientation = params.get("AdjustOrientation")
4539
+ memeber_set = set(params.keys())
4540
+ for name, value in vars(self).items():
4541
+ property_name = name[1:]
4542
+ if property_name in memeber_set:
4543
+ memeber_set.remove(property_name)
4544
+ if len(memeber_set) > 0:
4545
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4546
+
4547
+
4548
+
4549
+ class CropEnhanceImageOCRResponse(AbstractModel):
4550
+ r"""CropEnhanceImageOCR返回参数结构体
4551
+
4552
+ """
4553
+
4554
+ def __init__(self):
4555
+ r"""
4556
+ :param _CroppedWidth: <p>处理后图的宽</p>
4557
+ :type CroppedWidth: int
4558
+ :param _CroppedHeight: <p>处理后图的高</p>
4559
+ :type CroppedHeight: int
4560
+ :param _CroppedImage: <p>图像处理后的jpg图片,base64格式</p>
4561
+ :type CroppedImage: str
4562
+ :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>
4563
+ :type Position: list of int
4564
+ :param _Angle: <p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4565
+ 注意:此字段可能返回 null,表示取不到有效值。
4566
+ :type Angle: int
4567
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4568
+ :type RequestId: str
4569
+ """
4570
+ self._CroppedWidth = None
4571
+ self._CroppedHeight = None
4572
+ self._CroppedImage = None
4573
+ self._Position = None
4574
+ self._Angle = None
4575
+ self._RequestId = None
4576
+
4577
+ @property
4578
+ def CroppedWidth(self):
4579
+ r"""<p>处理后图的宽</p>
4580
+ :rtype: int
4581
+ """
4582
+ return self._CroppedWidth
4583
+
4584
+ @CroppedWidth.setter
4585
+ def CroppedWidth(self, CroppedWidth):
4586
+ self._CroppedWidth = CroppedWidth
4587
+
4588
+ @property
4589
+ def CroppedHeight(self):
4590
+ r"""<p>处理后图的高</p>
4591
+ :rtype: int
4592
+ """
4593
+ return self._CroppedHeight
4594
+
4595
+ @CroppedHeight.setter
4596
+ def CroppedHeight(self, CroppedHeight):
4597
+ self._CroppedHeight = CroppedHeight
4598
+
4599
+ @property
4600
+ def CroppedImage(self):
4601
+ r"""<p>图像处理后的jpg图片,base64格式</p>
4602
+ :rtype: str
4603
+ """
4604
+ return self._CroppedImage
4605
+
4606
+ @CroppedImage.setter
4607
+ def CroppedImage(self, CroppedImage):
4608
+ self._CroppedImage = CroppedImage
4609
+
4610
+ @property
4611
+ def Position(self):
4612
+ 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>
4613
+ :rtype: list of int
4614
+ """
4615
+ return self._Position
4616
+
4617
+ @Position.setter
4618
+ def Position(self, Position):
4619
+ self._Position = Position
4620
+
4621
+ @property
4622
+ def Angle(self):
4623
+ r"""<p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4624
+ 注意:此字段可能返回 null,表示取不到有效值。
4625
+ :rtype: int
4626
+ """
4627
+ return self._Angle
4628
+
4629
+ @Angle.setter
4630
+ def Angle(self, Angle):
4631
+ self._Angle = Angle
4632
+
4633
+ @property
4634
+ def RequestId(self):
4635
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4636
+ :rtype: str
4637
+ """
4638
+ return self._RequestId
4639
+
4640
+ @RequestId.setter
4641
+ def RequestId(self, RequestId):
4642
+ self._RequestId = RequestId
4643
+
4644
+
4645
+ def _deserialize(self, params):
4646
+ self._CroppedWidth = params.get("CroppedWidth")
4647
+ self._CroppedHeight = params.get("CroppedHeight")
4648
+ self._CroppedImage = params.get("CroppedImage")
4649
+ self._Position = params.get("Position")
4650
+ self._Angle = params.get("Angle")
4651
+ self._RequestId = params.get("RequestId")
4652
+
4653
+
4408
4654
  class CustomsDeclaration(AbstractModel):
4409
4655
  r"""海关进/出口货物报关单
4410
4656
 
@@ -8383,6 +8629,183 @@ class EnterpriseLicenseOCRResponse(AbstractModel):
8383
8629
  self._RequestId = params.get("RequestId")
8384
8630
 
8385
8631
 
8632
+ class EraseHandwrittenImageOCRRequest(AbstractModel):
8633
+ r"""EraseHandwrittenImageOCR请求参数结构体
8634
+
8635
+ """
8636
+
8637
+ def __init__(self):
8638
+ r"""
8639
+ :param _ImageBase64: 图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8640
+ :type ImageBase64: str
8641
+ :param _ImageUrl: 图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8642
+ :type ImageUrl: str
8643
+ :param _PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
8644
+ :type PdfPageNumber: int
8645
+ :param _Crop: 0表示关闭切边,默认为0
8646
+ 1表示开启切边
8647
+ :type Crop: int
8648
+ :param _Deskew: 0表示关闭弯曲矫正,默认为0
8649
+ 1表示开启弯曲矫正
8650
+ :type Deskew: int
8651
+ :param _Sharpen: 0表示关闭增强锐化,默认为0
8652
+ 1表示开启增强锐化
8653
+ :type Sharpen: int
8654
+ :param _Grayscale: 0表示返回黑白图像
8655
+ 1表示返回彩色图像,默认为1
8656
+ :type Grayscale: int
8657
+ """
8658
+ self._ImageBase64 = None
8659
+ self._ImageUrl = None
8660
+ self._PdfPageNumber = None
8661
+ self._Crop = None
8662
+ self._Deskew = None
8663
+ self._Sharpen = None
8664
+ self._Grayscale = None
8665
+
8666
+ @property
8667
+ def ImageBase64(self):
8668
+ r"""图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8669
+ :rtype: str
8670
+ """
8671
+ return self._ImageBase64
8672
+
8673
+ @ImageBase64.setter
8674
+ def ImageBase64(self, ImageBase64):
8675
+ self._ImageBase64 = ImageBase64
8676
+
8677
+ @property
8678
+ def ImageUrl(self):
8679
+ r"""图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8680
+ :rtype: str
8681
+ """
8682
+ return self._ImageUrl
8683
+
8684
+ @ImageUrl.setter
8685
+ def ImageUrl(self, ImageUrl):
8686
+ self._ImageUrl = ImageUrl
8687
+
8688
+ @property
8689
+ def PdfPageNumber(self):
8690
+ r"""需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
8691
+ :rtype: int
8692
+ """
8693
+ return self._PdfPageNumber
8694
+
8695
+ @PdfPageNumber.setter
8696
+ def PdfPageNumber(self, PdfPageNumber):
8697
+ self._PdfPageNumber = PdfPageNumber
8698
+
8699
+ @property
8700
+ def Crop(self):
8701
+ r"""0表示关闭切边,默认为0
8702
+ 1表示开启切边
8703
+ :rtype: int
8704
+ """
8705
+ return self._Crop
8706
+
8707
+ @Crop.setter
8708
+ def Crop(self, Crop):
8709
+ self._Crop = Crop
8710
+
8711
+ @property
8712
+ def Deskew(self):
8713
+ r"""0表示关闭弯曲矫正,默认为0
8714
+ 1表示开启弯曲矫正
8715
+ :rtype: int
8716
+ """
8717
+ return self._Deskew
8718
+
8719
+ @Deskew.setter
8720
+ def Deskew(self, Deskew):
8721
+ self._Deskew = Deskew
8722
+
8723
+ @property
8724
+ def Sharpen(self):
8725
+ r"""0表示关闭增强锐化,默认为0
8726
+ 1表示开启增强锐化
8727
+ :rtype: int
8728
+ """
8729
+ return self._Sharpen
8730
+
8731
+ @Sharpen.setter
8732
+ def Sharpen(self, Sharpen):
8733
+ self._Sharpen = Sharpen
8734
+
8735
+ @property
8736
+ def Grayscale(self):
8737
+ r"""0表示返回黑白图像
8738
+ 1表示返回彩色图像,默认为1
8739
+ :rtype: int
8740
+ """
8741
+ return self._Grayscale
8742
+
8743
+ @Grayscale.setter
8744
+ def Grayscale(self, Grayscale):
8745
+ self._Grayscale = Grayscale
8746
+
8747
+
8748
+ def _deserialize(self, params):
8749
+ self._ImageBase64 = params.get("ImageBase64")
8750
+ self._ImageUrl = params.get("ImageUrl")
8751
+ self._PdfPageNumber = params.get("PdfPageNumber")
8752
+ self._Crop = params.get("Crop")
8753
+ self._Deskew = params.get("Deskew")
8754
+ self._Sharpen = params.get("Sharpen")
8755
+ self._Grayscale = params.get("Grayscale")
8756
+ memeber_set = set(params.keys())
8757
+ for name, value in vars(self).items():
8758
+ property_name = name[1:]
8759
+ if property_name in memeber_set:
8760
+ memeber_set.remove(property_name)
8761
+ if len(memeber_set) > 0:
8762
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
8763
+
8764
+
8765
+
8766
+ class EraseHandwrittenImageOCRResponse(AbstractModel):
8767
+ r"""EraseHandwrittenImageOCR返回参数结构体
8768
+
8769
+ """
8770
+
8771
+ def __init__(self):
8772
+ r"""
8773
+ :param _Image: 图像处理后的jpg图片,base64格式
8774
+ :type Image: str
8775
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
8776
+ :type RequestId: str
8777
+ """
8778
+ self._Image = None
8779
+ self._RequestId = None
8780
+
8781
+ @property
8782
+ def Image(self):
8783
+ r"""图像处理后的jpg图片,base64格式
8784
+ :rtype: str
8785
+ """
8786
+ return self._Image
8787
+
8788
+ @Image.setter
8789
+ def Image(self, Image):
8790
+ self._Image = Image
8791
+
8792
+ @property
8793
+ def RequestId(self):
8794
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
8795
+ :rtype: str
8796
+ """
8797
+ return self._RequestId
8798
+
8799
+ @RequestId.setter
8800
+ def RequestId(self, RequestId):
8801
+ self._RequestId = RequestId
8802
+
8803
+
8804
+ def _deserialize(self, params):
8805
+ self._Image = params.get("Image")
8806
+ self._RequestId = params.get("RequestId")
8807
+
8808
+
8386
8809
  class EstateCertOCRRequest(AbstractModel):
8387
8810
  r"""EstateCertOCR请求参数结构体
8388
8811
 
@@ -250,6 +250,31 @@ class OcrClient(AbstractClient):
250
250
  raise TencentCloudSDKException(type(e).__name__, str(e))
251
251
 
252
252
 
253
+ def CropEnhanceImageOCR(self, request):
254
+ r"""图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
255
+
256
+ 默认接口请求频率限制:5次/秒。
257
+
258
+ :param request: Request instance for CropEnhanceImageOCR.
259
+ :type request: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRRequest`
260
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRResponse`
261
+
262
+ """
263
+ try:
264
+ params = request._serialize()
265
+ headers = request.headers
266
+ body = self.call("CropEnhanceImageOCR", params, headers=headers)
267
+ response = json.loads(body)
268
+ model = models.CropEnhanceImageOCRResponse()
269
+ model._deserialize(response["Response"])
270
+ return model
271
+ except Exception as e:
272
+ if isinstance(e, TencentCloudSDKException):
273
+ raise
274
+ else:
275
+ raise TencentCloudSDKException(type(e).__name__, str(e))
276
+
277
+
253
278
  def DescribeExtractDocAgentJob(self, request):
254
279
  r"""模型参数更大,速度更慢。推荐场景:可以接受异步(超过30s返回),样本输入输出token大于2000,长文本类文档建议用异步模型。需要 SubmitExtractDocAgentJob(提交任务)、DescribeExtractDocAgentJob(查询任务)两个接口配套使用,计费发生在提交任务后。【备注:1.固定价格不限抽取字段数,2.自适应价格抽取字段大于10记两次费用,小于等于10记一次费用】
255
280
 
@@ -431,6 +456,31 @@ class OcrClient(AbstractClient):
431
456
  raise TencentCloudSDKException(type(e).__name__, str(e))
432
457
 
433
458
 
459
+ def EraseHandwrittenImageOCR(self, request):
460
+ r"""本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
461
+
462
+ 默认接口请求频率限制:5次/秒。
463
+
464
+ :param request: Request instance for EraseHandwrittenImageOCR.
465
+ :type request: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRRequest`
466
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRResponse`
467
+
468
+ """
469
+ try:
470
+ params = request._serialize()
471
+ headers = request.headers
472
+ body = self.call("EraseHandwrittenImageOCR", params, headers=headers)
473
+ response = json.loads(body)
474
+ model = models.EraseHandwrittenImageOCRResponse()
475
+ model._deserialize(response["Response"])
476
+ return model
477
+ except Exception as e:
478
+ if isinstance(e, TencentCloudSDKException):
479
+ raise
480
+ else:
481
+ raise TencentCloudSDKException(type(e).__name__, str(e))
482
+
483
+
434
484
  def EstateCertOCR(self, request):
435
485
  r"""本接口支持不动产权证关键字段的识别,包括使用期限、面积、用途、权利性质、权利类型、坐落、共有情况、权利人、权利其他状况等。
436
486
 
@@ -204,6 +204,26 @@ class OcrClient(AbstractClient):
204
204
 
205
205
  return await self.call_and_deserialize(**kwargs)
206
206
 
207
+ async def CropEnhanceImageOCR(
208
+ self,
209
+ request: models.CropEnhanceImageOCRRequest,
210
+ opts: Dict = None,
211
+ ) -> models.CropEnhanceImageOCRResponse:
212
+ """
213
+ 图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
214
+
215
+ 默认接口请求频率限制:5次/秒。
216
+ """
217
+
218
+ kwargs = {}
219
+ kwargs["action"] = "CropEnhanceImageOCR"
220
+ kwargs["params"] = request._serialize()
221
+ kwargs["resp_cls"] = models.CropEnhanceImageOCRResponse
222
+ kwargs["headers"] = request.headers
223
+ kwargs["opts"] = opts or {}
224
+
225
+ return await self.call_and_deserialize(**kwargs)
226
+
207
227
  async def DescribeExtractDocAgentJob(
208
228
  self,
209
229
  request: models.DescribeExtractDocAgentJobRequest,
@@ -350,6 +370,26 @@ class OcrClient(AbstractClient):
350
370
 
351
371
  return await self.call_and_deserialize(**kwargs)
352
372
 
373
+ async def EraseHandwrittenImageOCR(
374
+ self,
375
+ request: models.EraseHandwrittenImageOCRRequest,
376
+ opts: Dict = None,
377
+ ) -> models.EraseHandwrittenImageOCRResponse:
378
+ """
379
+ 本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
380
+
381
+ 默认接口请求频率限制:5次/秒。
382
+ """
383
+
384
+ kwargs = {}
385
+ kwargs["action"] = "EraseHandwrittenImageOCR"
386
+ kwargs["params"] = request._serialize()
387
+ kwargs["resp_cls"] = models.EraseHandwrittenImageOCRResponse
388
+ kwargs["headers"] = request.headers
389
+ kwargs["opts"] = opts or {}
390
+
391
+ return await self.call_and_deserialize(**kwargs)
392
+
353
393
  async def EstateCertOCR(
354
394
  self,
355
395
  request: models.EstateCertOCRRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.128
3
+ Version: 3.1.130
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.128
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.130
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.130
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.128