tencentcloud-sdk-nodejs-ocr 4.0.1031 → 4.0.1033

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-ocr",
3
- "version": "4.0.1031",
3
+ "version": "4.0.1033",
4
4
  "description": "Tencent Cloud API NODEJS SDK",
5
5
  "main": "tencentcloud/index.js",
6
6
  "scripts": {
@@ -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
- RecognizeEncryptedIDCardOCRRequest,
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
 
@@ -1422,6 +1422,10 @@ export interface QuestionSplitOCRRequest {
1422
1422
  * 是否开启切边增强和弯曲矫正,默认为false不开启
1423
1423
  */
1424
1424
  EnableImageCrop?: boolean
1425
+ /**
1426
+ * 是否只返回检测框,默认false
1427
+ */
1428
+ EnableOnlyDetectBorder?: boolean
1425
1429
  }
1426
1430
 
1427
1431
  /**
@@ -2646,6 +2650,42 @@ export interface FormulaOCRResponse {
2646
2650
  RequestId?: string
2647
2651
  }
2648
2652
 
2653
+ /**
2654
+ * RecognizeGeneralCardWarn请求参数结构体
2655
+ */
2656
+ export interface RecognizeGeneralCardWarnRequest {
2657
+ /**
2658
+ * 图片链接
2659
+ */
2660
+ ImageUrl?: string
2661
+ /**
2662
+ * 图片base64
2663
+ */
2664
+ ImageBase64?: string
2665
+ /**
2666
+ * 卡证类型参数,包含以下范围:
2667
+ General:通用卡证
2668
+ IDCard:身份证
2669
+ Passport:护照
2670
+ BankCard:银行卡
2671
+ VehicleLicense:行驶证
2672
+ DriverLicense:驾驶证
2673
+ BizLicense:营业执照
2674
+ HmtResidentPermit:港澳台居住证
2675
+ ForeignPermanentResident:外国人永居证
2676
+ MainlandPermit:港澳台来往内地通行证
2677
+ */
2678
+ CardType?: string
2679
+ /**
2680
+ * 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
2681
+ */
2682
+ IsPdf?: boolean
2683
+ /**
2684
+ * 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
2685
+ */
2686
+ PdfPageNumber?: number
2687
+ }
2688
+
2649
2689
  /**
2650
2690
  * 汽车票字段信息
2651
2691
  */
@@ -2665,6 +2705,66 @@ export interface BusInvoiceInfo {
2665
2705
  Rect?: Rect
2666
2706
  }
2667
2707
 
2708
+ /**
2709
+ * RecognizeEncryptedIDCardOCR请求参数结构体
2710
+ */
2711
+ export interface RecognizeEncryptedIDCardOCRRequest {
2712
+ /**
2713
+ * 请求体被加密后的密文(Base64编码),本接口只支持加密传输
2714
+ */
2715
+ EncryptedBody: string
2716
+ /**
2717
+ * 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
2718
+ */
2719
+ Encryption: Encryption
2720
+ /**
2721
+ * 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
2722
+ 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
2723
+ */
2724
+ ImageBase64?: string
2725
+ /**
2726
+ * 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
2727
+ 建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
2728
+ */
2729
+ ImageUrl?: string
2730
+ /**
2731
+ * FRONT:身份证有照片的一面(人像面),
2732
+ BACK:身份证有国徽的一面(国徽面),
2733
+ 该参数如果不填,将为您自动判断身份证正反面。
2734
+ */
2735
+ CardSide?: string
2736
+ /**
2737
+ * 以下可选字段均为bool 类型,默认false:
2738
+ CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
2739
+ CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
2740
+ CopyWarn,复印件告警
2741
+ BorderCheckWarn,边框和框内遮挡告警
2742
+ ReshootWarn,翻拍告警
2743
+ DetectPsWarn,疑似存在PS痕迹告警
2744
+ TempIdWarn,临时身份证告警
2745
+ InvalidDateWarn,身份证有效日期不合法告警
2746
+ Quality,图片质量分数(评价图片的模糊程度)
2747
+ MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
2748
+ ReflectWarn,是否开启反光检测
2749
+
2750
+ SDK 设置方式参考:
2751
+ Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
2752
+ API 3.0 Explorer 设置方式参考:
2753
+ Config = {"CropIdCard":true,"CropPortrait":true}
2754
+ */
2755
+ Config?: string
2756
+ /**
2757
+ * 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
2758
+ */
2759
+ EnableRecognitionRectify?: boolean
2760
+ /**
2761
+ * 默认值为false。
2762
+
2763
+ 此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
2764
+ */
2765
+ EnableReflectDetail?: boolean
2766
+ }
2767
+
2668
2768
  /**
2669
2769
  * SmartStructuralOCR请求参数结构体
2670
2770
  */
@@ -7406,6 +7506,54 @@ export interface FinanBillSliceOCRRequest {
7406
7506
  ImageUrl?: string
7407
7507
  }
7408
7508
 
7509
+ /**
7510
+ * RecognizeGeneralCardWarn返回参数结构体
7511
+ */
7512
+ export interface RecognizeGeneralCardWarnResponse {
7513
+ /**
7514
+ * 卡证类型参数,包含以下范围:
7515
+ General:通用卡证
7516
+ IDCard:身份证
7517
+ Passport:护照
7518
+ BankCard:银行卡
7519
+ VehicleLicense:行驶证
7520
+ DriverLicense:驾驶证
7521
+ BizLicense:营业执照
7522
+ HmtResidentPermit:港澳台居住证
7523
+ ForeignPermanentResident:外国人永居证
7524
+ MainlandPermit:港澳台来往内地通行证
7525
+ */
7526
+ CardType?: string
7527
+ /**
7528
+ * 模糊信息
7529
+ */
7530
+ Blur?: GeneralCardWarnInfo
7531
+ /**
7532
+ * 边框不完整信息
7533
+ */
7534
+ BorderIncomplete?: GeneralCardWarnInfo
7535
+ /**
7536
+ * 复印件信息
7537
+ */
7538
+ Copy?: GeneralCardWarnInfo
7539
+ /**
7540
+ * ps篡改信息
7541
+ */
7542
+ Ps?: GeneralCardWarnInfo
7543
+ /**
7544
+ * 反光信息
7545
+ */
7546
+ Reflection?: GeneralCardWarnInfo
7547
+ /**
7548
+ * 翻拍件信息
7549
+ */
7550
+ Reprint?: GeneralCardWarnInfo
7551
+ /**
7552
+ * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
7553
+ */
7554
+ RequestId?: string
7555
+ }
7556
+
7409
7557
  /**
7410
7558
  * ClassifyStoreName返回参数结构体
7411
7559
  */
@@ -8110,63 +8258,21 @@ export interface LineInfo {
8110
8258
  }
8111
8259
 
8112
8260
  /**
8113
- * RecognizeEncryptedIDCardOCR请求参数结构体
8261
+ * 通用卡证鉴伪告警信息
8114
8262
  */
8115
- export interface RecognizeEncryptedIDCardOCRRequest {
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
8129
- /**
8130
- * 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
8131
- 建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
8132
- */
8133
- ImageUrl?: string
8134
- /**
8135
- * FRONT:身份证有照片的一面(人像面),
8136
- BACK:身份证有国徽的一面(国徽面),
8137
- 该参数如果不填,将为您自动判断身份证正反面。
8138
- */
8139
- CardSide?: string
8263
+ export interface GeneralCardWarnInfo {
8140
8264
  /**
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}
8265
+ * 是否存在该告警
8158
8266
  */
8159
- Config?: string
8267
+ IsWarn?: boolean
8160
8268
  /**
8161
- * 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
8269
+ * 风险程度
8162
8270
  */
8163
- EnableRecognitionRectify?: boolean
8271
+ RiskConfidence?: number
8164
8272
  /**
8165
- * 默认值为false。
8166
-
8167
- 此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
8273
+ * 告警位置四点坐标
8168
8274
  */
8169
- EnableReflectDetail?: boolean
8275
+ Polygon?: Array<Polygon>
8170
8276
  }
8171
8277
 
8172
8278
  /**
@@ -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, RecognizeEncryptedIDCardOCRRequest, 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";
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
 
@@ -1366,6 +1366,10 @@ export interface QuestionSplitOCRRequest {
1366
1366
  * 是否开启切边增强和弯曲矫正,默认为false不开启
1367
1367
  */
1368
1368
  EnableImageCrop?: boolean;
1369
+ /**
1370
+ * 是否只返回检测框,默认false
1371
+ */
1372
+ EnableOnlyDetectBorder?: boolean;
1369
1373
  }
1370
1374
  /**
1371
1375
  * 增值税普通发票(卷票)条目
@@ -2545,6 +2549,41 @@ export interface FormulaOCRResponse {
2545
2549
  */
2546
2550
  RequestId?: string;
2547
2551
  }
2552
+ /**
2553
+ * RecognizeGeneralCardWarn请求参数结构体
2554
+ */
2555
+ export interface RecognizeGeneralCardWarnRequest {
2556
+ /**
2557
+ * 图片链接
2558
+ */
2559
+ ImageUrl?: string;
2560
+ /**
2561
+ * 图片base64
2562
+ */
2563
+ ImageBase64?: string;
2564
+ /**
2565
+ * 卡证类型参数,包含以下范围:
2566
+ General:通用卡证
2567
+ IDCard:身份证
2568
+ Passport:护照
2569
+ BankCard:银行卡
2570
+ VehicleLicense:行驶证
2571
+ DriverLicense:驾驶证
2572
+ BizLicense:营业执照
2573
+ HmtResidentPermit:港澳台居住证
2574
+ ForeignPermanentResident:外国人永居证
2575
+ MainlandPermit:港澳台来往内地通行证
2576
+ */
2577
+ CardType?: string;
2578
+ /**
2579
+ * 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
2580
+ */
2581
+ IsPdf?: boolean;
2582
+ /**
2583
+ * 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
2584
+ */
2585
+ PdfPageNumber?: number;
2586
+ }
2548
2587
  /**
2549
2588
  * 汽车票字段信息
2550
2589
  */
@@ -2563,6 +2602,65 @@ export interface BusInvoiceInfo {
2563
2602
  */
2564
2603
  Rect?: Rect;
2565
2604
  }
2605
+ /**
2606
+ * RecognizeEncryptedIDCardOCR请求参数结构体
2607
+ */
2608
+ export interface RecognizeEncryptedIDCardOCRRequest {
2609
+ /**
2610
+ * 请求体被加密后的密文(Base64编码),本接口只支持加密传输
2611
+ */
2612
+ EncryptedBody: string;
2613
+ /**
2614
+ * 敏感数据加密信息。对传入信息有加密需求的用户可使用此参数,详情请点击左侧链接。
2615
+ */
2616
+ Encryption: Encryption;
2617
+ /**
2618
+ * 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
2619
+ 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
2620
+ */
2621
+ ImageBase64?: string;
2622
+ /**
2623
+ * 图片的 Url 地址。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。图片下载时间不超过 3 秒。
2624
+ 建议图片存储于腾讯云,可保障更高的下载速度和稳定性。
2625
+ */
2626
+ ImageUrl?: string;
2627
+ /**
2628
+ * FRONT:身份证有照片的一面(人像面),
2629
+ BACK:身份证有国徽的一面(国徽面),
2630
+ 该参数如果不填,将为您自动判断身份证正反面。
2631
+ */
2632
+ CardSide?: string;
2633
+ /**
2634
+ * 以下可选字段均为bool 类型,默认false:
2635
+ CropIdCard,身份证照片裁剪(去掉证件外多余的边缘、自动矫正拍摄角度)
2636
+ CropPortrait,人像照片裁剪(自动抠取身份证头像区域)
2637
+ CopyWarn,复印件告警
2638
+ BorderCheckWarn,边框和框内遮挡告警
2639
+ ReshootWarn,翻拍告警
2640
+ DetectPsWarn,疑似存在PS痕迹告警
2641
+ TempIdWarn,临时身份证告警
2642
+ InvalidDateWarn,身份证有效日期不合法告警
2643
+ Quality,图片质量分数(评价图片的模糊程度)
2644
+ MultiCardDetect,是否开启正反面同框识别(仅支持二代身份证正反页同框识别或临时身份证正反页同框识别)
2645
+ ReflectWarn,是否开启反光检测
2646
+
2647
+ SDK 设置方式参考:
2648
+ Config = Json.stringify({"CropIdCard":true,"CropPortrait":true})
2649
+ API 3.0 Explorer 设置方式参考:
2650
+ Config = {"CropIdCard":true,"CropPortrait":true}
2651
+ */
2652
+ Config?: string;
2653
+ /**
2654
+ * 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
2655
+ */
2656
+ EnableRecognitionRectify?: boolean;
2657
+ /**
2658
+ * 默认值为false。
2659
+
2660
+ 此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
2661
+ */
2662
+ EnableReflectDetail?: boolean;
2663
+ }
2566
2664
  /**
2567
2665
  * SmartStructuralOCR请求参数结构体
2568
2666
  */
@@ -7193,6 +7291,53 @@ export interface FinanBillSliceOCRRequest {
7193
7291
  */
7194
7292
  ImageUrl?: string;
7195
7293
  }
7294
+ /**
7295
+ * RecognizeGeneralCardWarn返回参数结构体
7296
+ */
7297
+ export interface RecognizeGeneralCardWarnResponse {
7298
+ /**
7299
+ * 卡证类型参数,包含以下范围:
7300
+ General:通用卡证
7301
+ IDCard:身份证
7302
+ Passport:护照
7303
+ BankCard:银行卡
7304
+ VehicleLicense:行驶证
7305
+ DriverLicense:驾驶证
7306
+ BizLicense:营业执照
7307
+ HmtResidentPermit:港澳台居住证
7308
+ ForeignPermanentResident:外国人永居证
7309
+ MainlandPermit:港澳台来往内地通行证
7310
+ */
7311
+ CardType?: string;
7312
+ /**
7313
+ * 模糊信息
7314
+ */
7315
+ Blur?: GeneralCardWarnInfo;
7316
+ /**
7317
+ * 边框不完整信息
7318
+ */
7319
+ BorderIncomplete?: GeneralCardWarnInfo;
7320
+ /**
7321
+ * 复印件信息
7322
+ */
7323
+ Copy?: GeneralCardWarnInfo;
7324
+ /**
7325
+ * ps篡改信息
7326
+ */
7327
+ Ps?: GeneralCardWarnInfo;
7328
+ /**
7329
+ * 反光信息
7330
+ */
7331
+ Reflection?: GeneralCardWarnInfo;
7332
+ /**
7333
+ * 翻拍件信息
7334
+ */
7335
+ Reprint?: GeneralCardWarnInfo;
7336
+ /**
7337
+ * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
7338
+ */
7339
+ RequestId?: string;
7340
+ }
7196
7341
  /**
7197
7342
  * ClassifyStoreName返回参数结构体
7198
7343
  */
@@ -7874,63 +8019,21 @@ export interface LineInfo {
7874
8019
  Lines?: Array<ItemInfo>;
7875
8020
  }
7876
8021
  /**
7877
- * RecognizeEncryptedIDCardOCR请求参数结构体
8022
+ * 通用卡证鉴伪告警信息
7878
8023
  */
7879
- export interface RecognizeEncryptedIDCardOCRRequest {
7880
- /**
7881
- * 请求体被加密后的密文(Base64编码),本接口只支持加密传输
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;
8024
+ export interface GeneralCardWarnInfo {
7893
8025
  /**
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}
8026
+ * 是否存在该告警
7922
8027
  */
7923
- Config?: string;
8028
+ IsWarn?: boolean;
7924
8029
  /**
7925
- * 默认值为true,打开识别结果纠正开关。开关开启后,身份证号、出生日期、性别,三个字段会进行矫正补齐,统一结果输出;若关闭此开关,以上三个字段不会进行矫正补齐,保持原始识别结果输出,若原图出现篡改情况,这三个字段的识别结果可能会不统一。
8030
+ * 风险程度
7926
8031
  */
7927
- EnableRecognitionRectify?: boolean;
8032
+ RiskConfidence?: number;
7928
8033
  /**
7929
- * 默认值为false。
7930
-
7931
- 此开关需要在反光检测开关开启下才会生效(即此开关生效的前提是config入参里的"ReflectWarn":true),若EnableReflectDetail设置为true,则会返回反光点覆盖区域详情。反光点覆盖区域详情分为四部分:人像照片位置、国徽位置、识别字段位置、其他位置。一个反光点允许覆盖多个区域,且一张图片可能存在多个反光点。
8034
+ * 告警位置四点坐标
7932
8035
  */
7933
- EnableReflectDetail?: boolean;
8036
+ Polygon?: Array<Polygon>;
7934
8037
  }
7935
8038
  /**
7936
8039
  * 过路过桥费发票