tencentcloud-sdk-ocr 3.0.986 → 3.0.987
Sign up to get free protection for your applications and to get access to all the features.
- 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: 9ec06826431d6217c2efd58aeae252fc256e3a70
|
4
|
+
data.tar.gz: e74a8c10bee12b69e10e94960c35249f724041d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee1c159bbbbf8dc8dc85c8a1ff781645127f5063698af7ab5cb1aa2ad4499096efdb62bc4b37babf2ac2f0bdd4d2e472beb11520c57fc1c70b9789d283316908
|
7
|
+
data.tar.gz: 2c7bb96632532514b4a713584704bb530cde92e19f893f6f0a84ca95cd457d13b7ad838d84d6ffa87f9954775add5d2f58dc72b594598c7181d0b43d795820d7
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.987
|
data/lib/v20181119/client.rb
CHANGED
@@ -1635,6 +1635,30 @@ module TencentCloud
|
|
1635
1635
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1636
1636
|
end
|
1637
1637
|
|
1638
|
+
# 支持通用证照的有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能,支持通用证照的ps伪造检测,可以应用于各种证件信息有效性校验场景。
|
1639
|
+
|
1640
|
+
# @param request: Request instance for RecognizeGeneralCardWarn.
|
1641
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::RecognizeGeneralCardWarnRequest`
|
1642
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::RecognizeGeneralCardWarnResponse`
|
1643
|
+
def RecognizeGeneralCardWarn(request)
|
1644
|
+
body = send_request('RecognizeGeneralCardWarn', request.serialize)
|
1645
|
+
response = JSON.parse(body)
|
1646
|
+
if response['Response'].key?('Error') == false
|
1647
|
+
model = RecognizeGeneralCardWarnResponse.new
|
1648
|
+
model.deserialize(response['Response'])
|
1649
|
+
model
|
1650
|
+
else
|
1651
|
+
code = response['Response']['Error']['Code']
|
1652
|
+
message = response['Response']['Error']['Message']
|
1653
|
+
reqid = response['Response']['RequestId']
|
1654
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1655
|
+
end
|
1656
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1657
|
+
raise e
|
1658
|
+
rescue StandardError => e
|
1659
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1660
|
+
end
|
1661
|
+
|
1638
1662
|
# 本接口支持 PDF多页(最多30页)、一页中单张、多张、类型票据的混合识别,同时支持单选识别某类票据,已支持票种包括:增值税发票(专票、普票、卷票、区块链发票、通行费发票)、全电发票(专票、普票)、非税发票(通用票据、统一缴纳书)、定额发票、通用机打发票、购车发票(机动车销售发票、二手车发票)、火车票、出租车发票、机票行程单、汽车票、轮船票、过路过桥费发票共14种标准报销发票,支持OFD格式的 增值税电子普通发票、增值税电子专用发票、电子发票(普通发票)、电子发票(增值税专用发票)、电子发票(机票行程单)、电子发票(铁路电子客票)的第一页识别,并支持非上述类型的其他发票的智能识别,点击[立即试用](https://cloud.tencent.com/product/ocr)。
|
1639
1663
|
|
1640
1664
|
# 默认接口请求频率限制:5次/秒。
|
data/lib/v20181119/models.rb
CHANGED
@@ -3682,6 +3682,37 @@ module TencentCloud
|
|
3682
3682
|
end
|
3683
3683
|
end
|
3684
3684
|
|
3685
|
+
# 通用卡证鉴伪告警信息
|
3686
|
+
class GeneralCardWarnInfo < TencentCloud::Common::AbstractModel
|
3687
|
+
# @param IsWarn: 是否存在该告警
|
3688
|
+
# @type IsWarn: Boolean
|
3689
|
+
# @param RiskConfidence: 风险程度
|
3690
|
+
# @type RiskConfidence: Float
|
3691
|
+
# @param Polygon: 告警位置四点坐标
|
3692
|
+
# @type Polygon: Array
|
3693
|
+
|
3694
|
+
attr_accessor :IsWarn, :RiskConfidence, :Polygon
|
3695
|
+
|
3696
|
+
def initialize(iswarn=nil, riskconfidence=nil, polygon=nil)
|
3697
|
+
@IsWarn = iswarn
|
3698
|
+
@RiskConfidence = riskconfidence
|
3699
|
+
@Polygon = polygon
|
3700
|
+
end
|
3701
|
+
|
3702
|
+
def deserialize(params)
|
3703
|
+
@IsWarn = params['IsWarn']
|
3704
|
+
@RiskConfidence = params['RiskConfidence']
|
3705
|
+
unless params['Polygon'].nil?
|
3706
|
+
@Polygon = []
|
3707
|
+
params['Polygon'].each do |i|
|
3708
|
+
polygon_tmp = Polygon.new
|
3709
|
+
polygon_tmp.deserialize(i)
|
3710
|
+
@Polygon << polygon_tmp
|
3711
|
+
end
|
3712
|
+
end
|
3713
|
+
end
|
3714
|
+
end
|
3715
|
+
|
3685
3716
|
# GeneralEfficientOCR请求参数结构体
|
3686
3717
|
class GeneralEfficientOCRRequest < TencentCloud::Common::AbstractModel
|
3687
3718
|
# @param ImageBase64: 图片的 Base64 值。
|
@@ -8253,6 +8284,120 @@ module TencentCloud
|
|
8253
8284
|
end
|
8254
8285
|
end
|
8255
8286
|
|
8287
|
+
# RecognizeGeneralCardWarn请求参数结构体
|
8288
|
+
class RecognizeGeneralCardWarnRequest < TencentCloud::Common::AbstractModel
|
8289
|
+
# @param ImageUrl: 图片链接
|
8290
|
+
# @type ImageUrl: String
|
8291
|
+
# @param ImageBase64: 图片base64
|
8292
|
+
# @type ImageBase64: String
|
8293
|
+
# @param CardType: 卡证类型参数,包含以下范围:
|
8294
|
+
# default:通用卡证
|
8295
|
+
# idcard:身份证
|
8296
|
+
# passport:护照
|
8297
|
+
# bizlicense:营业执照
|
8298
|
+
# regcertificate:登记证书
|
8299
|
+
# residpermit:居住证
|
8300
|
+
# transpermit:通行证
|
8301
|
+
# signboard:门头照
|
8302
|
+
# bankcard:银行卡
|
8303
|
+
# drivinglicense:驾驶证、行驶证
|
8304
|
+
# @type CardType: String
|
8305
|
+
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
8306
|
+
# @type IsPdf: Boolean
|
8307
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
8308
|
+
# @type PdfPageNumber: Integer
|
8309
|
+
|
8310
|
+
attr_accessor :ImageUrl, :ImageBase64, :CardType, :IsPdf, :PdfPageNumber
|
8311
|
+
|
8312
|
+
def initialize(imageurl=nil, imagebase64=nil, cardtype=nil, ispdf=nil, pdfpagenumber=nil)
|
8313
|
+
@ImageUrl = imageurl
|
8314
|
+
@ImageBase64 = imagebase64
|
8315
|
+
@CardType = cardtype
|
8316
|
+
@IsPdf = ispdf
|
8317
|
+
@PdfPageNumber = pdfpagenumber
|
8318
|
+
end
|
8319
|
+
|
8320
|
+
def deserialize(params)
|
8321
|
+
@ImageUrl = params['ImageUrl']
|
8322
|
+
@ImageBase64 = params['ImageBase64']
|
8323
|
+
@CardType = params['CardType']
|
8324
|
+
@IsPdf = params['IsPdf']
|
8325
|
+
@PdfPageNumber = params['PdfPageNumber']
|
8326
|
+
end
|
8327
|
+
end
|
8328
|
+
|
8329
|
+
# RecognizeGeneralCardWarn返回参数结构体
|
8330
|
+
class RecognizeGeneralCardWarnResponse < TencentCloud::Common::AbstractModel
|
8331
|
+
# @param CardType: 卡证类型参数,包含以下范围:
|
8332
|
+
# default:通用卡证
|
8333
|
+
# idcard:身份证
|
8334
|
+
# passport:护照
|
8335
|
+
# bizlicense:营业执照
|
8336
|
+
# regcertificate:登记证书
|
8337
|
+
# residpermit:居住证
|
8338
|
+
# transpermit:通行证
|
8339
|
+
# signboard:门头照
|
8340
|
+
# bankcard:银行卡
|
8341
|
+
# drivinglicense:驾驶证、行驶证
|
8342
|
+
# @type CardType: String
|
8343
|
+
# @param Blur: 模糊信息
|
8344
|
+
# @type Blur: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8345
|
+
# @param BorderIncomplete: 边框不完整信息
|
8346
|
+
# @type BorderIncomplete: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8347
|
+
# @param Copy: 复印件信息
|
8348
|
+
# @type Copy: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8349
|
+
# @param Ps: ps篡改信息
|
8350
|
+
# @type Ps: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8351
|
+
# @param Reflection: 反光信息
|
8352
|
+
# @type Reflection: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8353
|
+
# @param Reprint: 翻拍件信息
|
8354
|
+
# @type Reprint: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
8355
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
8356
|
+
# @type RequestId: String
|
8357
|
+
|
8358
|
+
attr_accessor :CardType, :Blur, :BorderIncomplete, :Copy, :Ps, :Reflection, :Reprint, :RequestId
|
8359
|
+
|
8360
|
+
def initialize(cardtype=nil, blur=nil, borderincomplete=nil, copy=nil, ps=nil, reflection=nil, reprint=nil, requestid=nil)
|
8361
|
+
@CardType = cardtype
|
8362
|
+
@Blur = blur
|
8363
|
+
@BorderIncomplete = borderincomplete
|
8364
|
+
@Copy = copy
|
8365
|
+
@Ps = ps
|
8366
|
+
@Reflection = reflection
|
8367
|
+
@Reprint = reprint
|
8368
|
+
@RequestId = requestid
|
8369
|
+
end
|
8370
|
+
|
8371
|
+
def deserialize(params)
|
8372
|
+
@CardType = params['CardType']
|
8373
|
+
unless params['Blur'].nil?
|
8374
|
+
@Blur = GeneralCardWarnInfo.new
|
8375
|
+
@Blur.deserialize(params['Blur'])
|
8376
|
+
end
|
8377
|
+
unless params['BorderIncomplete'].nil?
|
8378
|
+
@BorderIncomplete = GeneralCardWarnInfo.new
|
8379
|
+
@BorderIncomplete.deserialize(params['BorderIncomplete'])
|
8380
|
+
end
|
8381
|
+
unless params['Copy'].nil?
|
8382
|
+
@Copy = GeneralCardWarnInfo.new
|
8383
|
+
@Copy.deserialize(params['Copy'])
|
8384
|
+
end
|
8385
|
+
unless params['Ps'].nil?
|
8386
|
+
@Ps = GeneralCardWarnInfo.new
|
8387
|
+
@Ps.deserialize(params['Ps'])
|
8388
|
+
end
|
8389
|
+
unless params['Reflection'].nil?
|
8390
|
+
@Reflection = GeneralCardWarnInfo.new
|
8391
|
+
@Reflection.deserialize(params['Reflection'])
|
8392
|
+
end
|
8393
|
+
unless params['Reprint'].nil?
|
8394
|
+
@Reprint = GeneralCardWarnInfo.new
|
8395
|
+
@Reprint.deserialize(params['Reprint'])
|
8396
|
+
end
|
8397
|
+
@RequestId = params['RequestId']
|
8398
|
+
end
|
8399
|
+
end
|
8400
|
+
|
8256
8401
|
# RecognizeGeneralInvoice请求参数结构体
|
8257
8402
|
class RecognizeGeneralInvoiceRequest < TencentCloud::Common::AbstractModel
|
8258
8403
|
# @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.987
|
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-01-
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|