tencentcloud-sdk-ocr 3.0.998 → 3.0.1000
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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20181119/client.rb +24 -0
- data/lib/v20181119/models.rb +145 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce34f442677d67e2fc19cb5e39b3421366bf864
|
4
|
+
data.tar.gz: f21d150fa91fd45ab6ed464c2f252b09c2959ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80a380bae3fddb2ecf8480b625e1d97d55661f0b7b3f6a8842c31ce1c2f3aa21dd99eecef0cdb9f1c2b587d2c395c6194d8740350421f60664ae17f5c2d8931c
|
7
|
+
data.tar.gz: 6f22f38bad6a1a95eef1a29b5fee0836c9c8e1d0969da248fbd487341e4c183697a21afb78aa5706cd038a7fba479472f630b978a676324f16dfd22bf7be8ee2
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1000
|
data/lib/v20181119/client.rb
CHANGED
@@ -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次/秒。
|
data/lib/v20181119/models.rb
CHANGED
@@ -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 值。
|
@@ -8541,6 +8572,120 @@ module TencentCloud
|
|
8541
8572
|
end
|
8542
8573
|
end
|
8543
8574
|
|
8575
|
+
# RecognizeGeneralCardWarn请求参数结构体
|
8576
|
+
class RecognizeGeneralCardWarnRequest < TencentCloud::Common::AbstractModel
|
8577
|
+
# @param ImageUrl: 图片链接
|
8578
|
+
# @type ImageUrl: String
|
8579
|
+
# @param ImageBase64: 图片base64
|
8580
|
+
# @type ImageBase64: String
|
8581
|
+
# @param CardType: 卡证类型参数,包含以下范围:
|
8582
|
+
# General:通用卡证
|
8583
|
+
# IDCard:身份证
|
8584
|
+
# Passport:护照
|
8585
|
+
# BankCard:银行卡
|
8586
|
+
# VehicleLicense:行驶证
|
8587
|
+
# DriverLicense:驾驶证
|
8588
|
+
# BizLicense:营业执照
|
8589
|
+
# HmtResidentPermit:港澳台居住证
|
8590
|
+
# ForeignPermanentResident:外国人永居证
|
8591
|
+
# MainlandPermit:港澳台来往内地通行证
|
8592
|
+
# @type CardType: String
|
8593
|
+
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
8594
|
+
# @type IsPdf: Boolean
|
8595
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
8596
|
+
# @type PdfPageNumber: Integer
|
8597
|
+
|
8598
|
+
attr_accessor :ImageUrl, :ImageBase64, :CardType, :IsPdf, :PdfPageNumber
|
8599
|
+
|
8600
|
+
def initialize(imageurl=nil, imagebase64=nil, cardtype=nil, ispdf=nil, pdfpagenumber=nil)
|
8601
|
+
@ImageUrl = imageurl
|
8602
|
+
@ImageBase64 = imagebase64
|
8603
|
+
@CardType = cardtype
|
8604
|
+
@IsPdf = ispdf
|
8605
|
+
@PdfPageNumber = pdfpagenumber
|
8606
|
+
end
|
8607
|
+
|
8608
|
+
def deserialize(params)
|
8609
|
+
@ImageUrl = params['ImageUrl']
|
8610
|
+
@ImageBase64 = params['ImageBase64']
|
8611
|
+
@CardType = params['CardType']
|
8612
|
+
@IsPdf = params['IsPdf']
|
8613
|
+
@PdfPageNumber = params['PdfPageNumber']
|
8614
|
+
end
|
8615
|
+
end
|
8616
|
+
|
8617
|
+
# RecognizeGeneralCardWarn返回参数结构体
|
8618
|
+
class RecognizeGeneralCardWarnResponse < TencentCloud::Common::AbstractModel
|
8619
|
+
# @param CardType: 卡证类型参数,包含以下范围:
|
8620
|
+
# General:通用卡证
|
8621
|
+
# IDCard:身份证
|
8622
|
+
# Passport:护照
|
8623
|
+
# BankCard:银行卡
|
8624
|
+
# VehicleLicense:行驶证
|
8625
|
+
# DriverLicense:驾驶证
|
8626
|
+
# BizLicense:营业执照
|
8627
|
+
# HmtResidentPermit:港澳台居住证
|
8628
|
+
# ForeignPermanentResident:外国人永居证
|
8629
|
+
# MainlandPermit:港澳台来往内地通行证
|
8630
|
+
# @type CardType: String
|
8631
|
+
# @param Blur: 模糊信息
|
8632
|
+
# @type Blur: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8633
|
+
# @param BorderIncomplete: 边框不完整信息
|
8634
|
+
# @type BorderIncomplete: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8635
|
+
# @param Copy: 复印件信息
|
8636
|
+
# @type Copy: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8637
|
+
# @param Ps: ps篡改信息
|
8638
|
+
# @type Ps: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8639
|
+
# @param Reflection: 反光信息
|
8640
|
+
# @type Reflection: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8641
|
+
# @param Reprint: 翻拍件信息
|
8642
|
+
# @type Reprint: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8643
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
8644
|
+
# @type RequestId: String
|
8645
|
+
|
8646
|
+
attr_accessor :CardType, :Blur, :BorderIncomplete, :Copy, :Ps, :Reflection, :Reprint, :RequestId
|
8647
|
+
|
8648
|
+
def initialize(cardtype=nil, blur=nil, borderincomplete=nil, copy=nil, ps=nil, reflection=nil, reprint=nil, requestid=nil)
|
8649
|
+
@CardType = cardtype
|
8650
|
+
@Blur = blur
|
8651
|
+
@BorderIncomplete = borderincomplete
|
8652
|
+
@Copy = copy
|
8653
|
+
@Ps = ps
|
8654
|
+
@Reflection = reflection
|
8655
|
+
@Reprint = reprint
|
8656
|
+
@RequestId = requestid
|
8657
|
+
end
|
8658
|
+
|
8659
|
+
def deserialize(params)
|
8660
|
+
@CardType = params['CardType']
|
8661
|
+
unless params['Blur'].nil?
|
8662
|
+
@Blur = GeneralCardWarnInfo.new
|
8663
|
+
@Blur.deserialize(params['Blur'])
|
8664
|
+
end
|
8665
|
+
unless params['BorderIncomplete'].nil?
|
8666
|
+
@BorderIncomplete = GeneralCardWarnInfo.new
|
8667
|
+
@BorderIncomplete.deserialize(params['BorderIncomplete'])
|
8668
|
+
end
|
8669
|
+
unless params['Copy'].nil?
|
8670
|
+
@Copy = GeneralCardWarnInfo.new
|
8671
|
+
@Copy.deserialize(params['Copy'])
|
8672
|
+
end
|
8673
|
+
unless params['Ps'].nil?
|
8674
|
+
@Ps = GeneralCardWarnInfo.new
|
8675
|
+
@Ps.deserialize(params['Ps'])
|
8676
|
+
end
|
8677
|
+
unless params['Reflection'].nil?
|
8678
|
+
@Reflection = GeneralCardWarnInfo.new
|
8679
|
+
@Reflection.deserialize(params['Reflection'])
|
8680
|
+
end
|
8681
|
+
unless params['Reprint'].nil?
|
8682
|
+
@Reprint = GeneralCardWarnInfo.new
|
8683
|
+
@Reprint.deserialize(params['Reprint'])
|
8684
|
+
end
|
8685
|
+
@RequestId = params['RequestId']
|
8686
|
+
end
|
8687
|
+
end
|
8688
|
+
|
8544
8689
|
# RecognizeGeneralInvoice请求参数结构体
|
8545
8690
|
class RecognizeGeneralInvoiceRequest < TencentCloud::Common::AbstractModel
|
8546
8691
|
# @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.
|
4
|
+
version: 3.0.1000
|
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-
|
11
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|