tencentcloud-sdk-ocr 3.0.972 → 3.0.974
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 +3 -29
- data/lib/v20181119/models.rb +22 -126
- 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: fbab447534b2244e312a3e1d587ba93c35618bde
|
4
|
+
data.tar.gz: 236c4548e70b9428bcaf2b57ec4aff5ccb0388a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 962778f95c52c46136994ee98beee6d8bc821a3da642f57a5fd28bdab2d520c4dd16fba4ed2e552f48631a53656b6f6e5badfbedd50b7f11de8a1acf62452228
|
7
|
+
data.tar.gz: da591533df4323cb32bf480304764f141c1183dc3837a0b939631cca7cce10ea8e9dbaa4d180c9683d791c8131f0387e6ee081d5651cc58628b0ad21b6b84cb3
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.974
|
data/lib/v20181119/client.rb
CHANGED
@@ -83,32 +83,6 @@ module TencentCloud
|
|
83
83
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
84
84
|
end
|
85
85
|
|
86
|
-
# 本接口支持对中国大陆主流银行卡正反面关键字段的检测与识别,包括卡号、卡类型、卡名字、银行信息、有效期。支持竖排异形卡识别、多角度旋转图片识别。支持对复印件、翻拍件、边框遮挡的银行卡进行告警,可应用于各种银行卡信息有效性校验场景,如金融行业身份认证、第三方支付绑卡等场景。
|
87
|
-
|
88
|
-
# 默认接口请求频率限制:10次/秒。
|
89
|
-
|
90
|
-
# @param request: Request instance for BankCardOCR.
|
91
|
-
# @type request: :class:`Tencentcloud::ocr::V20181119::BankCardOCRRequest`
|
92
|
-
# @rtype: :class:`Tencentcloud::ocr::V20181119::BankCardOCRResponse`
|
93
|
-
def BankCardOCR(request)
|
94
|
-
body = send_request('BankCardOCR', request.serialize)
|
95
|
-
response = JSON.parse(body)
|
96
|
-
if response['Response'].key?('Error') == false
|
97
|
-
model = BankCardOCRResponse.new
|
98
|
-
model.deserialize(response['Response'])
|
99
|
-
model
|
100
|
-
else
|
101
|
-
code = response['Response']['Error']['Code']
|
102
|
-
message = response['Response']['Error']['Message']
|
103
|
-
reqid = response['Response']['RequestId']
|
104
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
105
|
-
end
|
106
|
-
rescue TencentCloud::Common::TencentCloudSDKException => e
|
107
|
-
raise e
|
108
|
-
rescue StandardError => e
|
109
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
110
|
-
end
|
111
|
-
|
112
86
|
# 本接口支持银行回单全字段的识别,包括付款开户行、收款开户行、付款账号、收款账号、回单类型、回单编号、币种、流水号、凭证号码、交易机构、交易金额、手续费、日期等字段信息。
|
113
87
|
|
114
88
|
# 默认接口请求频率限制:10次/秒。
|
@@ -1029,7 +1003,7 @@ module TencentCloud
|
|
1029
1003
|
# <table style="width:650px">
|
1030
1004
|
# <thead>
|
1031
1005
|
# <tr>
|
1032
|
-
# <th width="150"
|
1006
|
+
# <th width="150">扩展能力</th>
|
1033
1007
|
# <th width="500">能力项</th>
|
1034
1008
|
# </tr>
|
1035
1009
|
# </thead>
|
@@ -1545,7 +1519,7 @@ module TencentCloud
|
|
1545
1519
|
# <table style="width:650px">
|
1546
1520
|
# <thead>
|
1547
1521
|
# <tr>
|
1548
|
-
# <th width="150"
|
1522
|
+
# <th width="150">扩展能力</th>
|
1549
1523
|
# <th width="500">能力项</th>
|
1550
1524
|
# </tr>
|
1551
1525
|
# </thead>
|
@@ -2274,7 +2248,7 @@ module TencentCloud
|
|
2274
2248
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2275
2249
|
end
|
2276
2250
|
|
2277
|
-
# 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://cloud.tencent.com/
|
2251
|
+
# 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
|
2278
2252
|
|
2279
2253
|
# 默认接口请求频率限制:5次/秒。
|
2280
2254
|
|
data/lib/v20181119/models.rb
CHANGED
@@ -455,114 +455,6 @@ module TencentCloud
|
|
455
455
|
end
|
456
456
|
end
|
457
457
|
|
458
|
-
# BankCardOCR请求参数结构体
|
459
|
-
class BankCardOCRRequest < TencentCloud::Common::AbstractModel
|
460
|
-
# @param ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
461
|
-
# 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
462
|
-
# @type ImageBase64: String
|
463
|
-
# @param ImageUrl: 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
464
|
-
# 建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
465
|
-
# @type ImageUrl: String
|
466
|
-
# @param RetBorderCutImage: 是否返回预处理(精确剪裁对齐)后的银行卡图片数据,默认false。
|
467
|
-
# @type RetBorderCutImage: Boolean
|
468
|
-
# @param RetCardNoImage: 是否返回卡号的切图图片数据,默认false。
|
469
|
-
# @type RetCardNoImage: Boolean
|
470
|
-
# @param EnableCopyCheck: 复印件检测开关,如果输入的图片是银行卡复印件图片则返回告警,默认false。
|
471
|
-
# @type EnableCopyCheck: Boolean
|
472
|
-
# @param EnableReshootCheck: 翻拍检测开关,如果输入的图片是银行卡翻拍图片则返回告警,默认false。
|
473
|
-
# @type EnableReshootCheck: Boolean
|
474
|
-
# @param EnableBorderCheck: 边框遮挡检测开关,如果输入的图片是银行卡边框被遮挡则返回告警,默认false。
|
475
|
-
# @type EnableBorderCheck: Boolean
|
476
|
-
# @param EnableQualityValue: 是否返回图片质量分数(图片质量分数是评价一个图片的模糊程度的标准),默认false。
|
477
|
-
# @type EnableQualityValue: Boolean
|
478
|
-
|
479
|
-
attr_accessor :ImageBase64, :ImageUrl, :RetBorderCutImage, :RetCardNoImage, :EnableCopyCheck, :EnableReshootCheck, :EnableBorderCheck, :EnableQualityValue
|
480
|
-
|
481
|
-
def initialize(imagebase64=nil, imageurl=nil, retbordercutimage=nil, retcardnoimage=nil, enablecopycheck=nil, enablereshootcheck=nil, enablebordercheck=nil, enablequalityvalue=nil)
|
482
|
-
@ImageBase64 = imagebase64
|
483
|
-
@ImageUrl = imageurl
|
484
|
-
@RetBorderCutImage = retbordercutimage
|
485
|
-
@RetCardNoImage = retcardnoimage
|
486
|
-
@EnableCopyCheck = enablecopycheck
|
487
|
-
@EnableReshootCheck = enablereshootcheck
|
488
|
-
@EnableBorderCheck = enablebordercheck
|
489
|
-
@EnableQualityValue = enablequalityvalue
|
490
|
-
end
|
491
|
-
|
492
|
-
def deserialize(params)
|
493
|
-
@ImageBase64 = params['ImageBase64']
|
494
|
-
@ImageUrl = params['ImageUrl']
|
495
|
-
@RetBorderCutImage = params['RetBorderCutImage']
|
496
|
-
@RetCardNoImage = params['RetCardNoImage']
|
497
|
-
@EnableCopyCheck = params['EnableCopyCheck']
|
498
|
-
@EnableReshootCheck = params['EnableReshootCheck']
|
499
|
-
@EnableBorderCheck = params['EnableBorderCheck']
|
500
|
-
@EnableQualityValue = params['EnableQualityValue']
|
501
|
-
end
|
502
|
-
end
|
503
|
-
|
504
|
-
# BankCardOCR返回参数结构体
|
505
|
-
class BankCardOCRResponse < TencentCloud::Common::AbstractModel
|
506
|
-
# @param CardNo: 卡号
|
507
|
-
# @type CardNo: String
|
508
|
-
# @param BankInfo: 银行信息
|
509
|
-
# @type BankInfo: String
|
510
|
-
# @param ValidDate: 有效期,格式如:07/2023
|
511
|
-
# @type ValidDate: String
|
512
|
-
# @param CardType: 卡类型
|
513
|
-
# @type CardType: String
|
514
|
-
# @param CardName: 卡名字
|
515
|
-
# @type CardName: String
|
516
|
-
# @param BorderCutImage: 切片图片数据
|
517
|
-
# 注意:此字段可能返回 null,表示取不到有效值。
|
518
|
-
# @type BorderCutImage: String
|
519
|
-
# @param CardNoImage: 卡号图片数据
|
520
|
-
# 注意:此字段可能返回 null,表示取不到有效值。
|
521
|
-
# @type CardNoImage: String
|
522
|
-
# @param WarningCode: WarningCode 告警码列表和释义:
|
523
|
-
# -9110:银行卡日期无效;
|
524
|
-
# -9111:银行卡边框不完整;
|
525
|
-
# -9112:银行卡图片反光;
|
526
|
-
# -9113:银行卡复印件;
|
527
|
-
# -9114:银行卡翻拍件
|
528
|
-
# (告警码可以同时存在多个)
|
529
|
-
# 注意:此字段可能返回 null,表示取不到有效值。
|
530
|
-
# @type WarningCode: Array
|
531
|
-
# @param QualityValue: 图片质量分数,请求EnableQualityValue时返回(取值范围:0-100,分数越低越模糊,建议阈值≥50)。
|
532
|
-
# 注意:此字段可能返回 null,表示取不到有效值。
|
533
|
-
# @type QualityValue: Integer
|
534
|
-
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
535
|
-
# @type RequestId: String
|
536
|
-
|
537
|
-
attr_accessor :CardNo, :BankInfo, :ValidDate, :CardType, :CardName, :BorderCutImage, :CardNoImage, :WarningCode, :QualityValue, :RequestId
|
538
|
-
|
539
|
-
def initialize(cardno=nil, bankinfo=nil, validdate=nil, cardtype=nil, cardname=nil, bordercutimage=nil, cardnoimage=nil, warningcode=nil, qualityvalue=nil, requestid=nil)
|
540
|
-
@CardNo = cardno
|
541
|
-
@BankInfo = bankinfo
|
542
|
-
@ValidDate = validdate
|
543
|
-
@CardType = cardtype
|
544
|
-
@CardName = cardname
|
545
|
-
@BorderCutImage = bordercutimage
|
546
|
-
@CardNoImage = cardnoimage
|
547
|
-
@WarningCode = warningcode
|
548
|
-
@QualityValue = qualityvalue
|
549
|
-
@RequestId = requestid
|
550
|
-
end
|
551
|
-
|
552
|
-
def deserialize(params)
|
553
|
-
@CardNo = params['CardNo']
|
554
|
-
@BankInfo = params['BankInfo']
|
555
|
-
@ValidDate = params['ValidDate']
|
556
|
-
@CardType = params['CardType']
|
557
|
-
@CardName = params['CardName']
|
558
|
-
@BorderCutImage = params['BorderCutImage']
|
559
|
-
@CardNoImage = params['CardNoImage']
|
560
|
-
@WarningCode = params['WarningCode']
|
561
|
-
@QualityValue = params['QualityValue']
|
562
|
-
@RequestId = params['RequestId']
|
563
|
-
end
|
564
|
-
end
|
565
|
-
|
566
458
|
# 银行回单识别出的字段
|
567
459
|
class BankSlipInfo < TencentCloud::Common::AbstractModel
|
568
460
|
# @param Name: 识别出的字段名称(关键字),支持以下字段:
|
@@ -1731,8 +1623,8 @@ module TencentCloud
|
|
1731
1623
|
|
1732
1624
|
attr_accessor :PageNumber, :Angle, :Height, :Width, :OriginHeight, :OriginWidth, :Elements, :RotatedAngle
|
1733
1625
|
extend Gem::Deprecate
|
1734
|
-
deprecate :Angle, :none,
|
1735
|
-
deprecate :Angle=, :none,
|
1626
|
+
deprecate :Angle, :none, 2025, 1
|
1627
|
+
deprecate :Angle=, :none, 2025, 1
|
1736
1628
|
|
1737
1629
|
def initialize(pagenumber=nil, angle=nil, height=nil, width=nil, originheight=nil, originwidth=nil, elements=nil, rotatedangle=nil)
|
1738
1630
|
@PageNumber = pagenumber
|
@@ -3546,8 +3438,8 @@ module TencentCloud
|
|
3546
3438
|
|
3547
3439
|
attr_accessor :TextDetections, :Angel, :Angle, :RequestId
|
3548
3440
|
extend Gem::Deprecate
|
3549
|
-
deprecate :Angel, :none,
|
3550
|
-
deprecate :Angel=, :none,
|
3441
|
+
deprecate :Angel, :none, 2025, 1
|
3442
|
+
deprecate :Angel=, :none, 2025, 1
|
3551
3443
|
|
3552
3444
|
def initialize(textdetections=nil, angel=nil, angle=nil, requestid=nil)
|
3553
3445
|
@TextDetections = textdetections
|
@@ -3653,8 +3545,8 @@ module TencentCloud
|
|
3653
3545
|
|
3654
3546
|
attr_accessor :TextDetections, :Language, :Angel, :PdfPageSize, :Angle, :RequestId
|
3655
3547
|
extend Gem::Deprecate
|
3656
|
-
deprecate :Angel, :none,
|
3657
|
-
deprecate :Angel=, :none,
|
3548
|
+
deprecate :Angel, :none, 2025, 1
|
3549
|
+
deprecate :Angel=, :none, 2025, 1
|
3658
3550
|
|
3659
3551
|
def initialize(textdetections=nil, language=nil, angel=nil, pdfpagesize=nil, angle=nil, requestid=nil)
|
3660
3552
|
@TextDetections = textdetections
|
@@ -3866,8 +3758,8 @@ module TencentCloud
|
|
3866
3758
|
|
3867
3759
|
attr_accessor :TextDetections, :Angel, :Angle, :RequestId
|
3868
3760
|
extend Gem::Deprecate
|
3869
|
-
deprecate :Angel, :none,
|
3870
|
-
deprecate :Angel=, :none,
|
3761
|
+
deprecate :Angel, :none, 2025, 1
|
3762
|
+
deprecate :Angel=, :none, 2025, 1
|
3871
3763
|
|
3872
3764
|
def initialize(textdetections=nil, angel=nil, angle=nil, requestid=nil)
|
3873
3765
|
@TextDetections = textdetections
|
@@ -4137,8 +4029,8 @@ module TencentCloud
|
|
4137
4029
|
|
4138
4030
|
attr_accessor :ReturnHeadImage, :DetectFake, :ImageBase64, :ImageUrl
|
4139
4031
|
extend Gem::Deprecate
|
4140
|
-
deprecate :DetectFake, :none,
|
4141
|
-
deprecate :DetectFake=, :none,
|
4032
|
+
deprecate :DetectFake, :none, 2025, 1
|
4033
|
+
deprecate :DetectFake=, :none, 2025, 1
|
4142
4034
|
|
4143
4035
|
def initialize(returnheadimage=nil, detectfake=nil, imagebase64=nil, imageurl=nil)
|
4144
4036
|
@ReturnHeadImage = returnheadimage
|
@@ -4207,10 +4099,10 @@ module TencentCloud
|
|
4207
4099
|
|
4208
4100
|
attr_accessor :CnName, :EnName, :TelexCode, :Sex, :Birthday, :Permanent, :IdNum, :Symbol, :FirstIssueDate, :CurrentIssueDate, :FakeDetectResult, :HeadImage, :WarningCode, :WarnCardInfos, :RequestId
|
4209
4101
|
extend Gem::Deprecate
|
4210
|
-
deprecate :FakeDetectResult, :none,
|
4211
|
-
deprecate :FakeDetectResult=, :none,
|
4212
|
-
deprecate :WarningCode, :none,
|
4213
|
-
deprecate :WarningCode=, :none,
|
4102
|
+
deprecate :FakeDetectResult, :none, 2025, 1
|
4103
|
+
deprecate :FakeDetectResult=, :none, 2025, 1
|
4104
|
+
deprecate :WarningCode, :none, 2025, 1
|
4105
|
+
deprecate :WarningCode=, :none, 2025, 1
|
4214
4106
|
|
4215
4107
|
def initialize(cnname=nil, enname=nil, telexcode=nil, sex=nil, birthday=nil, permanent=nil, idnum=nil, symbol=nil, firstissuedate=nil, currentissuedate=nil, fakedetectresult=nil, headimage=nil, warningcode=nil, warncardinfos=nil, requestid=nil)
|
4216
4108
|
@CnName = cnname
|
@@ -5552,8 +5444,8 @@ module TencentCloud
|
|
5552
5444
|
|
5553
5445
|
attr_accessor :ID, :Name, :Address, :Sex, :Warn, :Image, :AdvancedInfo, :Type, :Birthday, :MyKadNumber, :WarnCardInfos, :RequestId
|
5554
5446
|
extend Gem::Deprecate
|
5555
|
-
deprecate :Warn, :none,
|
5556
|
-
deprecate :Warn=, :none,
|
5447
|
+
deprecate :Warn, :none, 2025, 1
|
5448
|
+
deprecate :Warn=, :none, 2025, 1
|
5557
5449
|
|
5558
5450
|
def initialize(id=nil, name=nil, address=nil, sex=nil, warn=nil, image=nil, advancedinfo=nil, type=nil, birthday=nil, mykadnumber=nil, warncardinfos=nil, requestid=nil)
|
5559
5451
|
@ID = id
|
@@ -10464,16 +10356,19 @@ module TencentCloud
|
|
10464
10356
|
# @type ReturnFullText: Boolean
|
10465
10357
|
# @param ConfigId: 配置id支持:General -- 通用场景 InvoiceEng -- 海运提单、国际invoice模版 WayBillEng --海运订单模板
|
10466
10358
|
# @type ConfigId: String
|
10359
|
+
# @param EnableCoord: 是否开启全文字段坐标值的识别
|
10360
|
+
# @type EnableCoord: Boolean
|
10467
10361
|
|
10468
|
-
attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId
|
10362
|
+
attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId, :EnableCoord
|
10469
10363
|
|
10470
|
-
def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil)
|
10364
|
+
def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil, enablecoord=nil)
|
10471
10365
|
@ImageUrl = imageurl
|
10472
10366
|
@ImageBase64 = imagebase64
|
10473
10367
|
@PdfPageNumber = pdfpagenumber
|
10474
10368
|
@ItemNames = itemnames
|
10475
10369
|
@ReturnFullText = returnfulltext
|
10476
10370
|
@ConfigId = configid
|
10371
|
+
@EnableCoord = enablecoord
|
10477
10372
|
end
|
10478
10373
|
|
10479
10374
|
def deserialize(params)
|
@@ -10483,6 +10378,7 @@ module TencentCloud
|
|
10483
10378
|
@ItemNames = params['ItemNames']
|
10484
10379
|
@ReturnFullText = params['ReturnFullText']
|
10485
10380
|
@ConfigId = params['ConfigId']
|
10381
|
+
@EnableCoord = params['EnableCoord']
|
10486
10382
|
end
|
10487
10383
|
end
|
10488
10384
|
|
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.974
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|