public ResultVo businessLicenseOcr(String picUrl){
try{
String id ="**************";
String key = "************";
Credential cred = new Credential(id, key);
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ocr.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
OcrClient client = new OcrClient(cred, "ap-beijing", clientProfile);
BizLicenseOCRRequest req = new BizLicenseOCRRequest();
req.setImageUrl(picUrl);
BizLicenseOCRResponse resp = client.BizLicenseOCR(req);
log.info(BizLicenseOCRResponse.toJsonString(resp));
return ResultVOUtils.success(resp);
} catch (TencentCloudSDKException e) {
log.info(e.toString());
return ResultVOUtils.error(Constants.$Failure,e.getMessage());
}
}
自动识别营业执照号码和地址实例
最新推荐文章于 2024-08-17 10:00:00 发布