tencentcloud-sdk-nodejs-ocr 4.0.1031 → 4.0.1032
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.
- package/package.json +1 -1
- package/src/services/ocr/v20181119/ocr_client.ts +14 -1
- package/src/services/ocr/v20181119/ocr_models.ts +152 -50
- package/tencentcloud/services/ocr/v20181119/ocr_client.d.ts +5 -1
- package/tencentcloud/services/ocr/v20181119/ocr_client.js +6 -0
- package/tencentcloud/services/ocr/v20181119/ocr_models.d.ts +149 -50
package/package.json
CHANGED
@@ -101,7 +101,9 @@ import {
|
|
101
101
|
RecognizeFormulaOCRResponse,
|
102
102
|
ArithmeticOCRResponse,
|
103
103
|
FormulaOCRResponse,
|
104
|
+
RecognizeGeneralCardWarnRequest,
|
104
105
|
BusInvoiceInfo,
|
106
|
+
RecognizeEncryptedIDCardOCRRequest,
|
105
107
|
SmartStructuralOCRRequest,
|
106
108
|
TableCellInfo,
|
107
109
|
GeneralHandwritingOCRRequest,
|
@@ -213,6 +215,7 @@ import {
|
|
213
215
|
NonTaxIncomeBill,
|
214
216
|
VerifyOfdVatInvoiceOCRRequest,
|
215
217
|
FinanBillSliceOCRRequest,
|
218
|
+
RecognizeGeneralCardWarnResponse,
|
216
219
|
ClassifyStoreNameResponse,
|
217
220
|
VatRollInvoiceOCRRequest,
|
218
221
|
AirTransport,
|
@@ -236,7 +239,7 @@ import {
|
|
236
239
|
DutyPaidProofOCRRequest,
|
237
240
|
RecognizeHealthCodeOCRResponse,
|
238
241
|
LineInfo,
|
239
|
-
|
242
|
+
GeneralCardWarnInfo,
|
240
243
|
TollInvoice,
|
241
244
|
ItemCoord,
|
242
245
|
CreateAIFormTaskResponse,
|
@@ -973,6 +976,16 @@ export class Client extends TencentCloudCommon.AbstractClient {
|
|
973
976
|
return this.request("GetTaskState", req, cb)
|
974
977
|
}
|
975
978
|
|
979
|
+
/**
|
980
|
+
* 支持通用证照的有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能,支持通用证照的ps伪造检测,可以应用于各种证件信息有效性校验场景。
|
981
|
+
*/
|
982
|
+
async RecognizeGeneralCardWarn(
|
983
|
+
req: RecognizeGeneralCardWarnRequest,
|
984
|
+
cb?: (error: string, rep: RecognizeGeneralCardWarnResponse) => void
|
985
|
+
): Promise<RecognizeGeneralCardWarnResponse> {
|
986
|
+
return this.request("RecognizeGeneralCardWarn", req, cb)
|
987
|
+
}
|
988
|
+
|
976
989
|
/**
|
977
990
|
* 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语,阿拉伯语20种语言,且各种语言均支持与英文混合的文字识别。
|
978
991
|
|
@@ -2646,6 +2646,42 @@ export interface FormulaOCRResponse {
|
|
2646
2646
|
RequestId?: string
|
2647
2647
|
}
|
2648
2648
|
|
2649
|
+
/**
|
2650
|
+
* RecognizeGeneralCardWarn请求参数结构体
|
2651
|
+
*/
|
2652
|
+
export interface RecognizeGeneralCardWarnRequest {
|
2653
|
+
/**
|
2654
|
+
* 图片链接
|
2655
|
+
*/
|
2656
|
+
ImageUrl?: string
|
2657
|
+
/**
|
2658
|
+
* 图片base64
|
2659
|
+
*/
|
2660
|
+
ImageBase64?: string
|
2661
|
+
/**
|
2662
|
+
* 卡证类型参数,包含以下范围:
|
2663
|
+
General:通用卡证
|
2664
|
+
IDCard:身份证
|
2665
|
+
Passport:护照
|
2666
|
+
BankCard:银行卡
|
2667
|
+
VehicleLicense:行驶证
|
2668
|
+
DriverLicense:驾驶证
|
2669
|
+
BizLicense:营业执照
|
2670
|
+
HmtResidentPermit:港澳台居住证
|
2671
|
+
ForeignPermanentResident:外国人永居证
|
2672
|
+
MainlandPermit:港澳台来往内地通行证
|
2673
|
+
*/
|
2674
|
+
CardType?: string
|
2675
|
+
/**
|
2676
|
+
* 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
2677
|
+
*/
|
2678
|
+
IsPdf?: boolean
|
2679
|
+
/**
|
2680
|
+
* 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
2681
|
+
*/
|
2682
|
+
PdfPageNumber?: number
|
2683
|
+
}
|
2684
|
+
|
2649
2685
|
/**
|
2650
2686
|
* 汽车票字段信息
|
2651
2687
|
*/
|
@@ -2665,6 +2701,66 @@ export interface BusInvoiceInfo {
|
|
2665
2701
|
Rect?: Rect
|
2666
2702
|
}
|
2667
2703
|
|
2704
|
+
/**
|
2705
|
+
* RecognizeEncryptedIDCardOCR请求参数结构体
|
2706
|
+
*/
|
2707
|
+
export interface RecognizeEncryptedIDCardOCRRequest {
|
2708
|
+
/**
|
2709
|
+
* 请求体被加密后的密文(Base64编码),本接口只支持加密传输
|
2710
|
+
*/
|
2711
|
+
EncryptedBody: string
|
2712
|
+
/**
|
2713
|
+
* 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
|
2714
|
+
*/
|
2715
|
+
Encryption: Encryption
|
2716
|
+
/**
|
2717
|
+
* 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
2718
|
+
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
2719
|
+
*/
|
2720
|
+
ImageBase64?: string
|
2721
|
+
/**
|
2722
|
+
* 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
|
2723
|
+
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
2724
|
+
*/
|
2725
|
+
ImageUrl?: string
|
2726
|
+
/**
|
2727
|
+
* FRONT:身份证有照片的一面(人像面),
|
2728
|
+
BACK:身份证有国徽的一面(国徽面),
|
2729
|
+
该参数如果不填,将为您自动判断身份证正反面。
|
2730
|
+
*/
|
2731
|
+
CardSide?: string
|
2732
|
+
/**
|
2733
|
+
* 以下可选字段均为bool 类型,默认false:
|
2734
|
+
CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
|
2735
|
+
CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
|
2736
|
+
CopyWarn,复印件告警
|
2737
|
+
BorderCheckWarn,边框和框内遮挡告警
|
2738
|
+
ReshootWarn,翻拍告警
|
2739
|
+
DetectPsWarn,疑似存在PS痕迹告警
|
2740
|
+
TempIdWarn,临时身份证告警
|
2741
|
+
InvalidDateWarn,身份证有效日期不合法告警
|
2742
|
+
Quality,图片质量分数(评价图片的模糊程度)
|
2743
|
+
MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
|
2744
|
+
ReflectWarn,是否开启反光检测
|
2745
|
+
|
2746
|
+
SDK 设置方式参考:
|
2747
|
+
Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
|
2748
|
+
API 3.0 Explorer 设置方式参考:
|
2749
|
+
Config = {"CropIdCard":true,"CropPortrait":true}
|
2750
|
+
*/
|
2751
|
+
Config?: string
|
2752
|
+
/**
|
2753
|
+
* 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
|
2754
|
+
*/
|
2755
|
+
EnableRecognitionRectify?: boolean
|
2756
|
+
/**
|
2757
|
+
* 默认值为false。
|
2758
|
+
|
2759
|
+
此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
|
2760
|
+
*/
|
2761
|
+
EnableReflectDetail?: boolean
|
2762
|
+
}
|
2763
|
+
|
2668
2764
|
/**
|
2669
2765
|
* SmartStructuralOCR请求参数结构体
|
2670
2766
|
*/
|
@@ -7406,6 +7502,54 @@ export interface FinanBillSliceOCRRequest {
|
|
7406
7502
|
ImageUrl?: string
|
7407
7503
|
}
|
7408
7504
|
|
7505
|
+
/**
|
7506
|
+
* RecognizeGeneralCardWarn返回参数结构体
|
7507
|
+
*/
|
7508
|
+
export interface RecognizeGeneralCardWarnResponse {
|
7509
|
+
/**
|
7510
|
+
* 卡证类型参数,包含以下范围:
|
7511
|
+
General:通用卡证
|
7512
|
+
IDCard:身份证
|
7513
|
+
Passport:护照
|
7514
|
+
BankCard:银行卡
|
7515
|
+
VehicleLicense:行驶证
|
7516
|
+
DriverLicense:驾驶证
|
7517
|
+
BizLicense:营业执照
|
7518
|
+
HmtResidentPermit:港澳台居住证
|
7519
|
+
ForeignPermanentResident:外国人永居证
|
7520
|
+
MainlandPermit:港澳台来往内地通行证
|
7521
|
+
*/
|
7522
|
+
CardType?: string
|
7523
|
+
/**
|
7524
|
+
* 模糊信息
|
7525
|
+
*/
|
7526
|
+
Blur?: GeneralCardWarnInfo
|
7527
|
+
/**
|
7528
|
+
* 边框不完整信息
|
7529
|
+
*/
|
7530
|
+
BorderIncomplete?: GeneralCardWarnInfo
|
7531
|
+
/**
|
7532
|
+
* 复印件信息
|
7533
|
+
*/
|
7534
|
+
Copy?: GeneralCardWarnInfo
|
7535
|
+
/**
|
7536
|
+
* ps篡改信息
|
7537
|
+
*/
|
7538
|
+
Ps?: GeneralCardWarnInfo
|
7539
|
+
/**
|
7540
|
+
* 反光信息
|
7541
|
+
*/
|
7542
|
+
Reflection?: GeneralCardWarnInfo
|
7543
|
+
/**
|
7544
|
+
* 翻拍件信息
|
7545
|
+
*/
|
7546
|
+
Reprint?: GeneralCardWarnInfo
|
7547
|
+
/**
|
7548
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
7549
|
+
*/
|
7550
|
+
RequestId?: string
|
7551
|
+
}
|
7552
|
+
|
7409
7553
|
/**
|
7410
7554
|
* ClassifyStoreName返回参数结构体
|
7411
7555
|
*/
|
@@ -8110,63 +8254,21 @@ export interface LineInfo {
|
|
8110
8254
|
}
|
8111
8255
|
|
8112
8256
|
/**
|
8113
|
-
*
|
8257
|
+
* 通用卡证鉴伪告警信息
|
8114
8258
|
*/
|
8115
|
-
export interface
|
8116
|
-
/**
|
8117
|
-
* 请求体被加密后的密文(Base64编码),本接口只支持加密传输
|
8118
|
-
*/
|
8119
|
-
EncryptedBody: string
|
8120
|
-
/**
|
8121
|
-
* 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
|
8122
|
-
*/
|
8123
|
-
Encryption: Encryption
|
8124
|
-
/**
|
8125
|
-
* 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
8126
|
-
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
8127
|
-
*/
|
8128
|
-
ImageBase64?: string
|
8259
|
+
export interface GeneralCardWarnInfo {
|
8129
8260
|
/**
|
8130
|
-
*
|
8131
|
-
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
8132
|
-
*/
|
8133
|
-
ImageUrl?: string
|
8134
|
-
/**
|
8135
|
-
* FRONT:身份证有照片的一面(人像面),
|
8136
|
-
BACK:身份证有国徽的一面(国徽面),
|
8137
|
-
该参数如果不填,将为您自动判断身份证正反面。
|
8138
|
-
*/
|
8139
|
-
CardSide?: string
|
8140
|
-
/**
|
8141
|
-
* 以下可选字段均为bool 类型,默认false:
|
8142
|
-
CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
|
8143
|
-
CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
|
8144
|
-
CopyWarn,复印件告警
|
8145
|
-
BorderCheckWarn,边框和框内遮挡告警
|
8146
|
-
ReshootWarn,翻拍告警
|
8147
|
-
DetectPsWarn,疑似存在PS痕迹告警
|
8148
|
-
TempIdWarn,临时身份证告警
|
8149
|
-
InvalidDateWarn,身份证有效日期不合法告警
|
8150
|
-
Quality,图片质量分数(评价图片的模糊程度)
|
8151
|
-
MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
|
8152
|
-
ReflectWarn,是否开启反光检测
|
8153
|
-
|
8154
|
-
SDK 设置方式参考:
|
8155
|
-
Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
|
8156
|
-
API 3.0 Explorer 设置方式参考:
|
8157
|
-
Config = {"CropIdCard":true,"CropPortrait":true}
|
8261
|
+
* 是否存在该告警
|
8158
8262
|
*/
|
8159
|
-
|
8263
|
+
IsWarn?: boolean
|
8160
8264
|
/**
|
8161
|
-
*
|
8265
|
+
* 风险程度
|
8162
8266
|
*/
|
8163
|
-
|
8267
|
+
RiskConfidence?: number
|
8164
8268
|
/**
|
8165
|
-
*
|
8166
|
-
|
8167
|
-
此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
|
8269
|
+
* 告警位置四点坐标
|
8168
8270
|
*/
|
8169
|
-
|
8271
|
+
Polygon?: Array<Polygon>
|
8170
8272
|
}
|
8171
8273
|
|
8172
8274
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
|
2
|
-
import { RecognizeOnlineTaxiItineraryOCRResponse, HKIDCardOCRRequest, BankSlipOCRRequest, BusinessCardOCRResponse, BankCardOCRRequest, SmartStructuralOCRResponse, CarInvoiceOCRRequest, RecognizeTravelCardOCRRequest, TrainTicketOCRRequest, EstateCertOCRResponse, FlightInvoiceOCRRequest, MLIDPassportOCRRequest, RecognizeGeneralTextImageWarnResponse, SmartStructuralOCRV2Request, TextDetectResponse, TollInvoiceOCRResponse, GetOCRTokenResponse, FinanBillSliceOCRResponse, DriverLicenseOCRResponse, WaybillOCRResponse, CreateAIFormTaskRequest, ClassifyStoreNameRequest, InvoiceGeneralOCRRequest, QuestionSplitOCRRequest, HmtResidentPermitOCRResponse, EnterpriseLicenseOCRResponse, QuestionOCRResponse, InstitutionOCRResponse, DriverLicenseOCRRequest, SmartStructuralProRequest, RecognizeTableOCRResponse, QrcodeOCRResponse, MainlandPermitOCRRequest, SmartStructuralOCRV2Response, EnterpriseLicenseOCRRequest, QuestionSplitOCRResponse, RecognizeStoreNameRequest, PropOwnerCertOCRResponse, TrainTicketOCRResponse, RecognizeFormulaOCRResponse, ArithmeticOCRResponse, FormulaOCRResponse, SmartStructuralOCRRequest, GeneralHandwritingOCRRequest, BizLicenseOCRRequest, MixedInvoiceDetectResponse, RideHailingDriverLicenseOCRRequest, GeneralAccurateOCRResponse, QrcodeOCRRequest, TaxiInvoiceOCRResponse, RecognizeGeneralInvoiceRequest, GeneralBasicOCRResponse, RecognizeMedicalInvoiceOCRResponse, RecognizeValidIDCardOCRRequest, MixedInvoiceOCRResponse, ClassifyDetectOCRResponse, VinOCRRequest, VehicleLicenseOCRResponse, VatInvoiceOCRRequest, ClassifyDetectOCRRequest, DutyPaidProofOCRResponse, TollInvoiceOCRRequest, LicensePlateOCRResponse, HKIDCardOCRResponse, RecognizeThaiIDCardOCRResponse, PermitOCRRequest, InvoiceGeneralOCRResponse, VatInvoiceVerifyNewResponse, TaxiInvoiceOCRRequest, RecognizeContainerOCRRequest, TextDetectRequest, VatRollInvoiceOCRResponse, VatInvoiceVerifyRequest, EduPaperOCRResponse, RecognizeThaiIDCardOCRRequest, PropOwnerCertOCRRequest, ImageEnhancementResponse, PassportOCRResponse, VehicleRegCertOCRRequest, RecognizeTravelCardOCRResponse, LicensePlateOCRRequest, GeneralBasicOCRRequest, ReconstructDocumentResponse, GeneralEfficientOCRRequest, AdvertiseOCRRequest, RideHailingDriverLicenseOCRResponse, ImageEnhancementRequest, EnglishOCRRequest, VatInvoiceVerifyResponse, RecognizeValidIDCardOCRResponse, IDCardOCRResponse, GeneralAccurateOCRRequest, OrgCodeCertOCRRequest, RecognizeFormulaOCRRequest, FlightInvoiceOCRResponse, ShipInvoiceOCRResponse, ReconstructDocumentRequest, VatInvoiceVerifyNewRequest, InstitutionOCRRequest, ArithmeticOCRRequest, VerifyOfdVatInvoiceOCRRequest, FinanBillSliceOCRRequest, ClassifyStoreNameResponse, VatRollInvoiceOCRRequest, RecognizeTableAccurateOCRRequest, SealOCRResponse, FinanBillOCRResponse, RecognizeHealthCodeOCRRequest, BankSlipOCRResponse, RecognizeEncryptedIDCardOCRResponse, VinOCRResponse, EduPaperOCRRequest, FormulaOCRRequest, PassportOCRRequest, DutyPaidProofOCRRequest, RecognizeHealthCodeOCRResponse,
|
2
|
+
import { RecognizeOnlineTaxiItineraryOCRResponse, HKIDCardOCRRequest, BankSlipOCRRequest, BusinessCardOCRResponse, BankCardOCRRequest, SmartStructuralOCRResponse, CarInvoiceOCRRequest, RecognizeTravelCardOCRRequest, TrainTicketOCRRequest, EstateCertOCRResponse, FlightInvoiceOCRRequest, MLIDPassportOCRRequest, RecognizeGeneralTextImageWarnResponse, SmartStructuralOCRV2Request, TextDetectResponse, TollInvoiceOCRResponse, GetOCRTokenResponse, FinanBillSliceOCRResponse, DriverLicenseOCRResponse, WaybillOCRResponse, CreateAIFormTaskRequest, ClassifyStoreNameRequest, InvoiceGeneralOCRRequest, QuestionSplitOCRRequest, HmtResidentPermitOCRResponse, EnterpriseLicenseOCRResponse, QuestionOCRResponse, InstitutionOCRResponse, DriverLicenseOCRRequest, SmartStructuralProRequest, RecognizeTableOCRResponse, QrcodeOCRResponse, MainlandPermitOCRRequest, SmartStructuralOCRV2Response, EnterpriseLicenseOCRRequest, QuestionSplitOCRResponse, RecognizeStoreNameRequest, PropOwnerCertOCRResponse, TrainTicketOCRResponse, RecognizeFormulaOCRResponse, ArithmeticOCRResponse, FormulaOCRResponse, RecognizeGeneralCardWarnRequest, RecognizeEncryptedIDCardOCRRequest, SmartStructuralOCRRequest, GeneralHandwritingOCRRequest, BizLicenseOCRRequest, MixedInvoiceDetectResponse, RideHailingDriverLicenseOCRRequest, GeneralAccurateOCRResponse, QrcodeOCRRequest, TaxiInvoiceOCRResponse, RecognizeGeneralInvoiceRequest, GeneralBasicOCRResponse, RecognizeMedicalInvoiceOCRResponse, RecognizeValidIDCardOCRRequest, MixedInvoiceOCRResponse, ClassifyDetectOCRResponse, VinOCRRequest, VehicleLicenseOCRResponse, VatInvoiceOCRRequest, ClassifyDetectOCRRequest, DutyPaidProofOCRResponse, TollInvoiceOCRRequest, LicensePlateOCRResponse, HKIDCardOCRResponse, RecognizeThaiIDCardOCRResponse, PermitOCRRequest, InvoiceGeneralOCRResponse, VatInvoiceVerifyNewResponse, TaxiInvoiceOCRRequest, RecognizeContainerOCRRequest, TextDetectRequest, VatRollInvoiceOCRResponse, VatInvoiceVerifyRequest, EduPaperOCRResponse, RecognizeThaiIDCardOCRRequest, PropOwnerCertOCRRequest, ImageEnhancementResponse, PassportOCRResponse, VehicleRegCertOCRRequest, RecognizeTravelCardOCRResponse, LicensePlateOCRRequest, GeneralBasicOCRRequest, ReconstructDocumentResponse, GeneralEfficientOCRRequest, AdvertiseOCRRequest, RideHailingDriverLicenseOCRResponse, ImageEnhancementRequest, EnglishOCRRequest, VatInvoiceVerifyResponse, RecognizeValidIDCardOCRResponse, IDCardOCRResponse, GeneralAccurateOCRRequest, OrgCodeCertOCRRequest, RecognizeFormulaOCRRequest, FlightInvoiceOCRResponse, ShipInvoiceOCRResponse, ReconstructDocumentRequest, VatInvoiceVerifyNewRequest, InstitutionOCRRequest, ArithmeticOCRRequest, VerifyOfdVatInvoiceOCRRequest, FinanBillSliceOCRRequest, RecognizeGeneralCardWarnResponse, ClassifyStoreNameResponse, VatRollInvoiceOCRRequest, RecognizeTableAccurateOCRRequest, SealOCRResponse, FinanBillOCRResponse, RecognizeHealthCodeOCRRequest, BankSlipOCRResponse, RecognizeEncryptedIDCardOCRResponse, VinOCRResponse, EduPaperOCRRequest, FormulaOCRRequest, PassportOCRRequest, DutyPaidProofOCRRequest, RecognizeHealthCodeOCRResponse, CreateAIFormTaskResponse, MixedInvoiceOCRRequest, ResidenceBookletOCRResponse, CarInvoiceOCRResponse, VehicleRegCertOCRResponse, GeneralFastOCRRequest, RecognizeGeneralInvoiceResponse, GetTaskStateResponse, QuestionOCRRequest, GetTaskStateRequest, RecognizeMedicalInvoiceOCRRequest, InsuranceBillOCRResponse, GeneralEfficientOCRResponse, ShipInvoiceOCRRequest, MLIDPassportOCRResponse, SealOCRRequest, VerifyOfdVatInvoiceOCRResponse, HmtResidentPermitOCRRequest, RecognizeTableAccurateOCRResponse, ResidenceBookletOCRRequest, GetOCRResultRequest, BusInvoiceOCRResponse, GetOCRResultResponse, MainlandPermitOCRResponse, MLIDCardOCRRequest, EnglishOCRResponse, RecognizeForeignPermanentResidentIdCardResponse, BusInvoiceOCRRequest, OrgCodeCertOCRResponse, RideHailingTransportLicenseOCRResponse, RecognizeContainerOCRResponse, SmartStructuralProResponse, PermitOCRResponse, InsuranceBillOCRRequest, GeneralHandwritingOCRResponse, TableOCRResponse, AdvertiseOCRResponse, VehicleLicenseOCRRequest, RecognizeOnlineTaxiItineraryOCRRequest, IDCardOCRRequest, MixedInvoiceDetectRequest, WaybillOCRRequest, RecognizeStoreNameResponse, GetOCRTokenRequest, RideHailingTransportLicenseOCRRequest, MLIDCardOCRResponse, RecognizeTableOCRRequest, EstateCertOCRRequest, BizLicenseOCRResponse, VatInvoiceOCRResponse, QuotaInvoiceOCRRequest, BankCardOCRResponse, TableOCRRequest, BusinessCardOCRRequest, FinanBillOCRRequest, QuotaInvoiceOCRResponse, RecognizeGeneralTextImageWarnRequest, RecognizeForeignPermanentResidentIdCardRequest, GeneralFastOCRResponse } from "./ocr_models";
|
3
3
|
/**
|
4
4
|
* ocr client
|
5
5
|
* @class
|
@@ -451,6 +451,10 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
|
|
451
451
|
支持查询智能表单录入任务的状态。本产品免费公测中,您可以点击demo(超链接:https://ocr.smartform.cloud.tencent.com/)试用,如需购买请与商务团队联系。
|
452
452
|
*/
|
453
453
|
GetTaskState(req: GetTaskStateRequest, cb?: (error: string, rep: GetTaskStateResponse) => void): Promise<GetTaskStateResponse>;
|
454
|
+
/**
|
455
|
+
* 支持通用证照的有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能,支持通用证照的ps伪造检测,可以应用于各种证件信息有效性校验场景。
|
456
|
+
*/
|
457
|
+
RecognizeGeneralCardWarn(req: RecognizeGeneralCardWarnRequest, cb?: (error: string, rep: RecognizeGeneralCardWarnResponse) => void): Promise<RecognizeGeneralCardWarnResponse>;
|
454
458
|
/**
|
455
459
|
* 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语,阿拉伯语20种语言,且各种语言均支持与英文混合的文字识别。
|
456
460
|
|
@@ -534,6 +534,12 @@ class Client extends TencentCloudCommon.AbstractClient {
|
|
534
534
|
async GetTaskState(req, cb) {
|
535
535
|
return this.request("GetTaskState", req, cb);
|
536
536
|
}
|
537
|
+
/**
|
538
|
+
* 支持通用证照的有效性检测告警,包括卡证复印件告警、卡证翻拍告警等功能,支持通用证照的ps伪造检测,可以应用于各种证件信息有效性校验场景。
|
539
|
+
*/
|
540
|
+
async RecognizeGeneralCardWarn(req, cb) {
|
541
|
+
return this.request("RecognizeGeneralCardWarn", req, cb);
|
542
|
+
}
|
537
543
|
/**
|
538
544
|
* 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语,阿拉伯语20种语言,且各种语言均支持与英文混合的文字识别。
|
539
545
|
|
@@ -2545,6 +2545,41 @@ export interface FormulaOCRResponse {
|
|
2545
2545
|
*/
|
2546
2546
|
RequestId?: string;
|
2547
2547
|
}
|
2548
|
+
/**
|
2549
|
+
* RecognizeGeneralCardWarn请求参数结构体
|
2550
|
+
*/
|
2551
|
+
export interface RecognizeGeneralCardWarnRequest {
|
2552
|
+
/**
|
2553
|
+
* 图片链接
|
2554
|
+
*/
|
2555
|
+
ImageUrl?: string;
|
2556
|
+
/**
|
2557
|
+
* 图片base64
|
2558
|
+
*/
|
2559
|
+
ImageBase64?: string;
|
2560
|
+
/**
|
2561
|
+
* 卡证类型参数,包含以下范围:
|
2562
|
+
General:通用卡证
|
2563
|
+
IDCard:身份证
|
2564
|
+
Passport:护照
|
2565
|
+
BankCard:银行卡
|
2566
|
+
VehicleLicense:行驶证
|
2567
|
+
DriverLicense:驾驶证
|
2568
|
+
BizLicense:营业执照
|
2569
|
+
HmtResidentPermit:港澳台居住证
|
2570
|
+
ForeignPermanentResident:外国人永居证
|
2571
|
+
MainlandPermit:港澳台来往内地通行证
|
2572
|
+
*/
|
2573
|
+
CardType?: string;
|
2574
|
+
/**
|
2575
|
+
* 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
2576
|
+
*/
|
2577
|
+
IsPdf?: boolean;
|
2578
|
+
/**
|
2579
|
+
* 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
2580
|
+
*/
|
2581
|
+
PdfPageNumber?: number;
|
2582
|
+
}
|
2548
2583
|
/**
|
2549
2584
|
* 汽车票字段信息
|
2550
2585
|
*/
|
@@ -2563,6 +2598,65 @@ export interface BusInvoiceInfo {
|
|
2563
2598
|
*/
|
2564
2599
|
Rect?: Rect;
|
2565
2600
|
}
|
2601
|
+
/**
|
2602
|
+
* RecognizeEncryptedIDCardOCR请求参数结构体
|
2603
|
+
*/
|
2604
|
+
export interface RecognizeEncryptedIDCardOCRRequest {
|
2605
|
+
/**
|
2606
|
+
* 请求体被加密后的密文(Base64编码),本接口只支持加密传输
|
2607
|
+
*/
|
2608
|
+
EncryptedBody: string;
|
2609
|
+
/**
|
2610
|
+
* 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
|
2611
|
+
*/
|
2612
|
+
Encryption: Encryption;
|
2613
|
+
/**
|
2614
|
+
* 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
2615
|
+
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
2616
|
+
*/
|
2617
|
+
ImageBase64?: string;
|
2618
|
+
/**
|
2619
|
+
* 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
|
2620
|
+
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
2621
|
+
*/
|
2622
|
+
ImageUrl?: string;
|
2623
|
+
/**
|
2624
|
+
* FRONT:身份证有照片的一面(人像面),
|
2625
|
+
BACK:身份证有国徽的一面(国徽面),
|
2626
|
+
该参数如果不填,将为您自动判断身份证正反面。
|
2627
|
+
*/
|
2628
|
+
CardSide?: string;
|
2629
|
+
/**
|
2630
|
+
* 以下可选字段均为bool 类型,默认false:
|
2631
|
+
CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
|
2632
|
+
CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
|
2633
|
+
CopyWarn,复印件告警
|
2634
|
+
BorderCheckWarn,边框和框内遮挡告警
|
2635
|
+
ReshootWarn,翻拍告警
|
2636
|
+
DetectPsWarn,疑似存在PS痕迹告警
|
2637
|
+
TempIdWarn,临时身份证告警
|
2638
|
+
InvalidDateWarn,身份证有效日期不合法告警
|
2639
|
+
Quality,图片质量分数(评价图片的模糊程度)
|
2640
|
+
MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
|
2641
|
+
ReflectWarn,是否开启反光检测
|
2642
|
+
|
2643
|
+
SDK 设置方式参考:
|
2644
|
+
Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
|
2645
|
+
API 3.0 Explorer 设置方式参考:
|
2646
|
+
Config = {"CropIdCard":true,"CropPortrait":true}
|
2647
|
+
*/
|
2648
|
+
Config?: string;
|
2649
|
+
/**
|
2650
|
+
* 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
|
2651
|
+
*/
|
2652
|
+
EnableRecognitionRectify?: boolean;
|
2653
|
+
/**
|
2654
|
+
* 默认值为false。
|
2655
|
+
|
2656
|
+
此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
|
2657
|
+
*/
|
2658
|
+
EnableReflectDetail?: boolean;
|
2659
|
+
}
|
2566
2660
|
/**
|
2567
2661
|
* SmartStructuralOCR请求参数结构体
|
2568
2662
|
*/
|
@@ -7193,6 +7287,53 @@ export interface FinanBillSliceOCRRequest {
|
|
7193
7287
|
*/
|
7194
7288
|
ImageUrl?: string;
|
7195
7289
|
}
|
7290
|
+
/**
|
7291
|
+
* RecognizeGeneralCardWarn返回参数结构体
|
7292
|
+
*/
|
7293
|
+
export interface RecognizeGeneralCardWarnResponse {
|
7294
|
+
/**
|
7295
|
+
* 卡证类型参数,包含以下范围:
|
7296
|
+
General:通用卡证
|
7297
|
+
IDCard:身份证
|
7298
|
+
Passport:护照
|
7299
|
+
BankCard:银行卡
|
7300
|
+
VehicleLicense:行驶证
|
7301
|
+
DriverLicense:驾驶证
|
7302
|
+
BizLicense:营业执照
|
7303
|
+
HmtResidentPermit:港澳台居住证
|
7304
|
+
ForeignPermanentResident:外国人永居证
|
7305
|
+
MainlandPermit:港澳台来往内地通行证
|
7306
|
+
*/
|
7307
|
+
CardType?: string;
|
7308
|
+
/**
|
7309
|
+
* 模糊信息
|
7310
|
+
*/
|
7311
|
+
Blur?: GeneralCardWarnInfo;
|
7312
|
+
/**
|
7313
|
+
* 边框不完整信息
|
7314
|
+
*/
|
7315
|
+
BorderIncomplete?: GeneralCardWarnInfo;
|
7316
|
+
/**
|
7317
|
+
* 复印件信息
|
7318
|
+
*/
|
7319
|
+
Copy?: GeneralCardWarnInfo;
|
7320
|
+
/**
|
7321
|
+
* ps篡改信息
|
7322
|
+
*/
|
7323
|
+
Ps?: GeneralCardWarnInfo;
|
7324
|
+
/**
|
7325
|
+
* 反光信息
|
7326
|
+
*/
|
7327
|
+
Reflection?: GeneralCardWarnInfo;
|
7328
|
+
/**
|
7329
|
+
* 翻拍件信息
|
7330
|
+
*/
|
7331
|
+
Reprint?: GeneralCardWarnInfo;
|
7332
|
+
/**
|
7333
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
7334
|
+
*/
|
7335
|
+
RequestId?: string;
|
7336
|
+
}
|
7196
7337
|
/**
|
7197
7338
|
* ClassifyStoreName返回参数结构体
|
7198
7339
|
*/
|
@@ -7874,63 +8015,21 @@ export interface LineInfo {
|
|
7874
8015
|
Lines?: Array<ItemInfo>;
|
7875
8016
|
}
|
7876
8017
|
/**
|
7877
|
-
*
|
8018
|
+
* 通用卡证鉴伪告警信息
|
7878
8019
|
*/
|
7879
|
-
export interface
|
8020
|
+
export interface GeneralCardWarnInfo {
|
7880
8021
|
/**
|
7881
|
-
*
|
7882
|
-
*/
|
7883
|
-
EncryptedBody: string;
|
7884
|
-
/**
|
7885
|
-
* 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
|
7886
|
-
*/
|
7887
|
-
Encryption: Encryption;
|
7888
|
-
/**
|
7889
|
-
* 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
7890
|
-
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
7891
|
-
*/
|
7892
|
-
ImageBase64?: string;
|
7893
|
-
/**
|
7894
|
-
* 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
|
7895
|
-
建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
|
7896
|
-
*/
|
7897
|
-
ImageUrl?: string;
|
7898
|
-
/**
|
7899
|
-
* FRONT:身份证有照片的一面(人像面),
|
7900
|
-
BACK:身份证有国徽的一面(国徽面),
|
7901
|
-
该参数如果不填,将为您自动判断身份证正反面。
|
7902
|
-
*/
|
7903
|
-
CardSide?: string;
|
7904
|
-
/**
|
7905
|
-
* 以下可选字段均为bool 类型,默认false:
|
7906
|
-
CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
|
7907
|
-
CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
|
7908
|
-
CopyWarn,复印件告警
|
7909
|
-
BorderCheckWarn,边框和框内遮挡告警
|
7910
|
-
ReshootWarn,翻拍告警
|
7911
|
-
DetectPsWarn,疑似存在PS痕迹告警
|
7912
|
-
TempIdWarn,临时身份证告警
|
7913
|
-
InvalidDateWarn,身份证有效日期不合法告警
|
7914
|
-
Quality,图片质量分数(评价图片的模糊程度)
|
7915
|
-
MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
|
7916
|
-
ReflectWarn,是否开启反光检测
|
7917
|
-
|
7918
|
-
SDK 设置方式参考:
|
7919
|
-
Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
|
7920
|
-
API 3.0 Explorer 设置方式参考:
|
7921
|
-
Config = {"CropIdCard":true,"CropPortrait":true}
|
8022
|
+
* 是否存在该告警
|
7922
8023
|
*/
|
7923
|
-
|
8024
|
+
IsWarn?: boolean;
|
7924
8025
|
/**
|
7925
|
-
*
|
8026
|
+
* 风险程度
|
7926
8027
|
*/
|
7927
|
-
|
8028
|
+
RiskConfidence?: number;
|
7928
8029
|
/**
|
7929
|
-
*
|
7930
|
-
|
7931
|
-
此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
|
8030
|
+
* 告警位置四点坐标
|
7932
8031
|
*/
|
7933
|
-
|
8032
|
+
Polygon?: Array<Polygon>;
|
7934
8033
|
}
|
7935
8034
|
/**
|
7936
8035
|
* 过路过桥费发票
|