tencentcloud-sdk-ocr 3.0.999 → 3.0.1001

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66f3c8b89da2e2814dea86bb5d77cafa896d9e38
4
- data.tar.gz: 73819cdb7114a8c2f1ab917ea51b159f6698f6f9
3
+ metadata.gz: def23e4ac91c1f94ce799d8206573baed24c572e
4
+ data.tar.gz: 39b021a97160e0d20e0e2d55ede785d696e19fec
5
5
  SHA512:
6
- metadata.gz: e49f22cdf53df317996d10da8368ad72118b1b0ce42a223467b5bdf196e0ab6057263a6da4d72688be8e99918b9a50905c7986fb88cf79e21b49778d634c4aac
7
- data.tar.gz: b37b3f54f3155a036504030f5728dcfebb36b62bed84f494063c26e07e4db02939da1707ad5f71b4494da83e36ae58011b71d2111a921d6fbbb7939abeae4cee
6
+ metadata.gz: 8e6f923696e5ad790913edc05a4c0c6fdf835787883289c29dbabe5766ff0540e0acffd40549e0c07777ccccda546568a58d912d99ad246d056aaad4ef8f856d
7
+ data.tar.gz: 12aba2d044f6a5e7692141270618d2d6f0feb8d2518a474d3a31b61d04d49a1c21afff11405f636639eaba9c6b91af311d3fcc3e2079a848ee4213f6905d2df4
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.999
1
+ 3.0.1001
@@ -1713,6 +1713,30 @@ module TencentCloud
1713
1713
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1714
1714
  end
1715
1715
 
1716
+ # 支持通用证照的有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能,支持通用证照的ps伪造检测,可以应用于各种证件信息有效性校验场景。
1717
+
1718
+ # @param request: Request instance for RecognizeGeneralCardWarn.
1719
+ # @type request: :class:`Tencentcloud::ocr::V20181119::RecognizeGeneralCardWarnRequest`
1720
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::RecognizeGeneralCardWarnResponse`
1721
+ def RecognizeGeneralCardWarn(request)
1722
+ body = send_request('RecognizeGeneralCardWarn', request.serialize)
1723
+ response = JSON.parse(body)
1724
+ if response['Response'].key?('Error') == false
1725
+ model = RecognizeGeneralCardWarnResponse.new
1726
+ model.deserialize(response['Response'])
1727
+ model
1728
+ else
1729
+ code = response['Response']['Error']['Code']
1730
+ message = response['Response']['Error']['Message']
1731
+ reqid = response['Response']['RequestId']
1732
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1733
+ end
1734
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1735
+ raise e
1736
+ rescue StandardError => e
1737
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1738
+ end
1739
+
1716
1740
  # 本接口支持 PDF多页(最多30页)、一页中单张、多张、类型票据的混合识别,同时支持单选识别某类票据,已支持票种包括:增值税发票(专票、普票、卷票、区块链发票、通行费发票)、全电发票(专票、普票)、非税发票(通用票据、统一缴纳书)、定额发票、通用机打发票、购车发票(机动车销售发票、二手车发票)、火车票、出租车发票、机票行程单、汽车票、轮船票、过路过桥费发票共14种标准报销发票,支持OFD格式的 增值税电子普通发票、增值税电子专用发票、电子发票(普通发票)、电子发票(增值税专用发票)、电子发票(机票行程单)、电子发票(铁路电子客票)的第一页识别,并支持非上述类型的其他发票的智能识别,点击[立即试用](https://cloud.tencent.com/product/ocr)。
1717
1741
 
1718
1742
  # 默认接口请求频率限制:5次/秒。
@@ -3737,6 +3737,37 @@ module TencentCloud
3737
3737
  end
3738
3738
  end
3739
3739
 
3740
+ # 通用卡证鉴伪告警信息
3741
+ class GeneralCardWarnInfo < TencentCloud::Common::AbstractModel
3742
+ # @param IsWarn: 是否存在该告警
3743
+ # @type IsWarn: Boolean
3744
+ # @param RiskConfidence: 风险程度
3745
+ # @type RiskConfidence: Float
3746
+ # @param Polygon: 告警位置四点坐标
3747
+ # @type Polygon: Array
3748
+
3749
+ attr_accessor :IsWarn, :RiskConfidence, :Polygon
3750
+
3751
+ def initialize(iswarn=nil, riskconfidence=nil, polygon=nil)
3752
+ @IsWarn = iswarn
3753
+ @RiskConfidence = riskconfidence
3754
+ @Polygon = polygon
3755
+ end
3756
+
3757
+ def deserialize(params)
3758
+ @IsWarn = params['IsWarn']
3759
+ @RiskConfidence = params['RiskConfidence']
3760
+ unless params['Polygon'].nil?
3761
+ @Polygon = []
3762
+ params['Polygon'].each do |i|
3763
+ polygon_tmp = Polygon.new
3764
+ polygon_tmp.deserialize(i)
3765
+ @Polygon << polygon_tmp
3766
+ end
3767
+ end
3768
+ end
3769
+ end
3770
+
3740
3771
  # GeneralEfficientOCR请求参数结构体
3741
3772
  class GeneralEfficientOCRRequest < TencentCloud::Common::AbstractModel
3742
3773
  # @param ImageBase64: 图片的 Base64 值。
@@ -7833,15 +7864,18 @@ module TencentCloud
7833
7864
  # @type PdfPageNumber: Integer
7834
7865
  # @param EnableImageCrop: 是否开启切边增强和弯曲矫正,默认为false不开启
7835
7866
  # @type EnableImageCrop: Boolean
7867
+ # @param EnableOnlyDetectBorder: 是否只返回检测框,默认false
7868
+ # @type EnableOnlyDetectBorder: Boolean
7836
7869
 
7837
- attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :EnableImageCrop
7870
+ attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :EnableImageCrop, :EnableOnlyDetectBorder
7838
7871
 
7839
- def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, enableimagecrop=nil)
7872
+ def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, enableimagecrop=nil, enableonlydetectborder=nil)
7840
7873
  @ImageUrl = imageurl
7841
7874
  @ImageBase64 = imagebase64
7842
7875
  @IsPdf = ispdf
7843
7876
  @PdfPageNumber = pdfpagenumber
7844
7877
  @EnableImageCrop = enableimagecrop
7878
+ @EnableOnlyDetectBorder = enableonlydetectborder
7845
7879
  end
7846
7880
 
7847
7881
  def deserialize(params)
@@ -7850,6 +7884,7 @@ module TencentCloud
7850
7884
  @IsPdf = params['IsPdf']
7851
7885
  @PdfPageNumber = params['PdfPageNumber']
7852
7886
  @EnableImageCrop = params['EnableImageCrop']
7887
+ @EnableOnlyDetectBorder = params['EnableOnlyDetectBorder']
7853
7888
  end
7854
7889
  end
7855
7890
 
@@ -8541,6 +8576,120 @@ module TencentCloud
8541
8576
  end
8542
8577
  end
8543
8578
 
8579
+ # RecognizeGeneralCardWarn请求参数结构体
8580
+ class RecognizeGeneralCardWarnRequest < TencentCloud::Common::AbstractModel
8581
+ # @param ImageUrl: 图片链接
8582
+ # @type ImageUrl: String
8583
+ # @param ImageBase64: 图片base64
8584
+ # @type ImageBase64: String
8585
+ # @param CardType: 卡证类型参数,包含以下范围:
8586
+ # General:通用卡证
8587
+ # IDCard:身份证
8588
+ # Passport:护照
8589
+ # BankCard:银行卡
8590
+ # VehicleLicense:行驶证
8591
+ # DriverLicense:驾驶证
8592
+ # BizLicense:营业执照
8593
+ # HmtResidentPermit:港澳台居住证
8594
+ # ForeignPermanentResident:外国人永居证
8595
+ # MainlandPermit:港澳台来往内地通行证
8596
+ # @type CardType: String
8597
+ # @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
8598
+ # @type IsPdf: Boolean
8599
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
8600
+ # @type PdfPageNumber: Integer
8601
+
8602
+ attr_accessor :ImageUrl, :ImageBase64, :CardType, :IsPdf, :PdfPageNumber
8603
+
8604
+ def initialize(imageurl=nil, imagebase64=nil, cardtype=nil, ispdf=nil, pdfpagenumber=nil)
8605
+ @ImageUrl = imageurl
8606
+ @ImageBase64 = imagebase64
8607
+ @CardType = cardtype
8608
+ @IsPdf = ispdf
8609
+ @PdfPageNumber = pdfpagenumber
8610
+ end
8611
+
8612
+ def deserialize(params)
8613
+ @ImageUrl = params['ImageUrl']
8614
+ @ImageBase64 = params['ImageBase64']
8615
+ @CardType = params['CardType']
8616
+ @IsPdf = params['IsPdf']
8617
+ @PdfPageNumber = params['PdfPageNumber']
8618
+ end
8619
+ end
8620
+
8621
+ # RecognizeGeneralCardWarn返回参数结构体
8622
+ class RecognizeGeneralCardWarnResponse < TencentCloud::Common::AbstractModel
8623
+ # @param CardType: 卡证类型参数,包含以下范围:
8624
+ # General:通用卡证
8625
+ # IDCard:身份证
8626
+ # Passport:护照
8627
+ # BankCard:银行卡
8628
+ # VehicleLicense:行驶证
8629
+ # DriverLicense:驾驶证
8630
+ # BizLicense:营业执照
8631
+ # HmtResidentPermit:港澳台居住证
8632
+ # ForeignPermanentResident:外国人永居证
8633
+ # MainlandPermit:港澳台来往内地通行证
8634
+ # @type CardType: String
8635
+ # @param Blur: 模糊信息
8636
+ # @type Blur: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8637
+ # @param BorderIncomplete: 边框不完整信息
8638
+ # @type BorderIncomplete: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8639
+ # @param Copy: 复印件信息
8640
+ # @type Copy: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8641
+ # @param Ps: ps篡改信息
8642
+ # @type Ps: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8643
+ # @param Reflection: 反光信息
8644
+ # @type Reflection: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8645
+ # @param Reprint: 翻拍件信息
8646
+ # @type Reprint: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
8647
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
8648
+ # @type RequestId: String
8649
+
8650
+ attr_accessor :CardType, :Blur, :BorderIncomplete, :Copy, :Ps, :Reflection, :Reprint, :RequestId
8651
+
8652
+ def initialize(cardtype=nil, blur=nil, borderincomplete=nil, copy=nil, ps=nil, reflection=nil, reprint=nil, requestid=nil)
8653
+ @CardType = cardtype
8654
+ @Blur = blur
8655
+ @BorderIncomplete = borderincomplete
8656
+ @Copy = copy
8657
+ @Ps = ps
8658
+ @Reflection = reflection
8659
+ @Reprint = reprint
8660
+ @RequestId = requestid
8661
+ end
8662
+
8663
+ def deserialize(params)
8664
+ @CardType = params['CardType']
8665
+ unless params['Blur'].nil?
8666
+ @Blur = GeneralCardWarnInfo.new
8667
+ @Blur.deserialize(params['Blur'])
8668
+ end
8669
+ unless params['BorderIncomplete'].nil?
8670
+ @BorderIncomplete = GeneralCardWarnInfo.new
8671
+ @BorderIncomplete.deserialize(params['BorderIncomplete'])
8672
+ end
8673
+ unless params['Copy'].nil?
8674
+ @Copy = GeneralCardWarnInfo.new
8675
+ @Copy.deserialize(params['Copy'])
8676
+ end
8677
+ unless params['Ps'].nil?
8678
+ @Ps = GeneralCardWarnInfo.new
8679
+ @Ps.deserialize(params['Ps'])
8680
+ end
8681
+ unless params['Reflection'].nil?
8682
+ @Reflection = GeneralCardWarnInfo.new
8683
+ @Reflection.deserialize(params['Reflection'])
8684
+ end
8685
+ unless params['Reprint'].nil?
8686
+ @Reprint = GeneralCardWarnInfo.new
8687
+ @Reprint.deserialize(params['Reprint'])
8688
+ end
8689
+ @RequestId = params['RequestId']
8690
+ end
8691
+ end
8692
+
8544
8693
  # RecognizeGeneralInvoice请求参数结构体
8545
8694
  class RecognizeGeneralInvoiceRequest < TencentCloud::Common::AbstractModel
8546
8695
  # @param ImageBase64: 图片的 Base64 值。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-ocr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.999
4
+ version: 3.0.1001
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-16 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common