类 OcrClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.ocr.OcrClient
-
public class OcrClient extends AbstractBceClient
Created by lvsiyuan on 16/11/18.
-
-
字段概要
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 OcrClient(BceClientConfiguration ocrConfig)Constructs a new client using the client configuration.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 BankcardRecognitionResponsebankcardRecognition(BankcardRecognitionRequest request)Gets the bankcard recognition properties of specific image resource.BankcardRecognitionResponsebankcardRecognition(String image)Gets the bankcard recognition properties of specific image resource.GeneralRecognitionResponsegeneralRecognition(GeneralRecognitionRequest request)Gets the general recognition properties of specific image resource.GeneralRecognitionResponsegeneralRecognition(String image)Gets the general recognition properties of specific image resource.GeneralRecognitionResponsegeneralRecognition(String image, String granularity, String mask, String langType, Boolean direction)Gets the general recognition properties of specific image resource.IdcardRecognitionResponseidcardRecognition(IdcardRecognitionRequest request)Gets the idcard recognition properties of specific image resource.IdcardRecognitionResponseidcardRecognition(String image, String side)Gets the idcard recognition properties of specific image resource.IdcardRecognitionResponseidcardRecognition(String image, String side, Boolean direction)Gets the idcard recognition properties of specific image resource.-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
OcrClient
public OcrClient(BceClientConfiguration ocrConfig)
Constructs a new client using the client configuration.- 参数:
ocrConfig- The client configuration options controlling how this client connects to Ocr services (e.g. proxy settings, retry counts, etc).
-
-
方法详细资料
-
bankcardRecognition
public BankcardRecognitionResponse bankcardRecognition(String image)
Gets the bankcard recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
image- The image data which needs to be base64- 返回:
- The bankcard recognition properties of the image resource
-
bankcardRecognition
public BankcardRecognitionResponse bankcardRecognition(BankcardRecognitionRequest request)
Gets the bankcard recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
request- The request wrapper object containing all options.- 返回:
- The bankcard recognition properties of the image resource
-
idcardRecognition
public IdcardRecognitionResponse idcardRecognition(String image, String side)
Gets the idcard recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
image- The image data which needs to be base64side- The side of idcard image. (front/back)- 返回:
- The idcard recognition properties of the image resource
-
idcardRecognition
public IdcardRecognitionResponse idcardRecognition(String image, String side, Boolean direction)
Gets the idcard recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
image- The image data which needs to be base64side- The side of idcard image. (front/back)direction- Decide if the image has been rotated (true/false)- 返回:
- The idcard recognition properties of the image resource
-
idcardRecognition
public IdcardRecognitionResponse idcardRecognition(IdcardRecognitionRequest request)
Gets the idcard recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
request- The request wrapper object containing all options.- 返回:
- The idcard recognition properties of the image resource
-
generalRecognition
public GeneralRecognitionResponse generalRecognition(String image)
Gets the general recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
image- The image data which needs to be base64- 返回:
- The general recognition properties of the image resource
-
generalRecognition
public GeneralRecognitionResponse generalRecognition(String image, String granularity, String mask, String langType, Boolean direction)
Gets the general recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
image- The image data which needs to be base64granularity- Decide if recognize single character (big/small)mask- Represent the gray/white/black shade image area (base64 data)langType- Language type, detail to be CHN_ENG (ENG/POR/FRE/GER/ITA/SPA/RUS/JAP)direction- Decide if the image has been rotated (true/false)- 返回:
- The general recognition properties of the image resource
-
generalRecognition
public GeneralRecognitionResponse generalRecognition(GeneralRecognitionRequest request)
Gets the general recognition properties of specific image resource.The caller must authenticate with a valid BCE Access Key / Private Key pair.
- 参数:
request- The request wrapper object containing all options.- 返回:
- The general recognition properties of the image resource
-
-