| | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public BizLicenseOCRResponse BizLicenseOCR(string ImageBase64) |
| | | { |
| | | try |
| | | { |
| | | |
| | | Credential cred = new Credential |
| | | { |
| | | SecretId = App.Configuration["TencentCloud:SecretId"] ?? "AKIDIPFp9CyThfMmvoQlpeCl34pKYVBahY9T", |
| | | SecretKey = App.Configuration["TencentCloud:SecretKey"] ?? "4rNcaHhrkMhmb9QQ9bmgKipfFZcOt86n" |
| | | }; |
| | | |
| | | ClientProfile clientProfile = new ClientProfile(); |
| | | HttpProfile httpProfile = new HttpProfile(); |
| | | |
| | | |
| | | httpProfile.Endpoint = ("ocr.tencentcloudapi.com"); |
| | | clientProfile.HttpProfile = httpProfile; |
| | | |
| | | var _ocrClient = new OcrClient(cred, "ap-chengdu", clientProfile); |
| | | |
| | | var ret = _ocrClient.BizLicenseOCRSync(new BizLicenseOCRRequest() |
| | | { |
| | | ImageBase64 = ImageBase64, |
| | | }); |
| | | |
| | | return ret; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | throw; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region iai 人脸识别 |