public BusinessLicenseOcrResponse doBusiness(BusinessLicenseOcrRequest req) throws ServiceHandleException { | public BusinessLicenseOcrResponse doBusiness(BusinessLicenseOcrRequest req) throws ServiceHandleException { | ||||
try { | try { | ||||
URL url = new URL(req.getUrl()); | URL url = new URL(req.getUrl()); | ||||
URL downloadUrl = new URL("http", "100.64.2.113", 9000, url.getPath()); | |||||
URL downloadUrl = new URL("http", "100.65.10.25", 8049, url.getPath()); | |||||
String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | ||||
BusinessLicenseOcrResponse res = baiduOcr(compressedImgBase64); | BusinessLicenseOcrResponse res = baiduOcr(compressedImgBase64); |
public IdCardOcrResponse doBusiness(IdCardOcrRequest req) throws ServiceHandleException { | public IdCardOcrResponse doBusiness(IdCardOcrRequest req) throws ServiceHandleException { | ||||
try { | try { | ||||
URL url = new URL(req.getUrl()); | URL url = new URL(req.getUrl()); | ||||
URL downloadUrl = new URL("http", "100.64.2.113", 9000, url.getPath()); | |||||
URL downloadUrl = new URL("http", "100.65.10.25", 8049, url.getPath()); | |||||
String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | ||||
IdCardOcrResponse res = baiduOcr(compressedImgBase64, req.getImageType()); | IdCardOcrResponse res = baiduOcr(compressedImgBase64, req.getImageType()); |
public VehicleLicenseOcrResponse doBusiness(VehicleLicenseOcrRequest req) throws ServiceHandleException { | public VehicleLicenseOcrResponse doBusiness(VehicleLicenseOcrRequest req) throws ServiceHandleException { | ||||
try { | try { | ||||
URL url = new URL(req.getUrl()); | URL url = new URL(req.getUrl()); | ||||
URL downloadUrl = new URL("http", "100.64.2.113", 9000, url.getPath()); | |||||
URL downloadUrl = new URL("http", "100.65.10.25", 8049, url.getPath()); | |||||
String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | String compressedImgBase64 = imageCompressManager.getBaiduOcrCompressBase64(downloadUrl.toString()); | ||||
VehicleLicenseOcrResponse res = baiduOcr(compressedImgBase64, req.getImageType()); | VehicleLicenseOcrResponse res = baiduOcr(compressedImgBase64, req.getImageType()); |