public class OcrClient extends AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX| Constructor and Description |
|---|
OcrClient(BceClientConfiguration ocrConfig)
Constructs a new client using the client configuration.
|
| Modifier and Type | Method and Description |
|---|---|
BankcardRecognitionResponse |
bankcardRecognition(BankcardRecognitionRequest request)
Gets the bankcard recognition properties of specific image resource.
|
BankcardRecognitionResponse |
bankcardRecognition(String image)
Gets the bankcard recognition properties of specific image resource.
|
GeneralRecognitionResponse |
generalRecognition(GeneralRecognitionRequest request)
Gets the general recognition properties of specific image resource.
|
GeneralRecognitionResponse |
generalRecognition(String image)
Gets the general recognition properties of specific image resource.
|
GeneralRecognitionResponse |
generalRecognition(String image,
String granularity,
String mask,
String langType,
Boolean direction)
Gets the general recognition properties of specific image resource.
|
IdcardRecognitionResponse |
idcardRecognition(IdcardRecognitionRequest request)
Gets the idcard recognition properties of specific image resource.
|
IdcardRecognitionResponse |
idcardRecognition(String image,
String side)
Gets the idcard recognition properties of specific image resource.
|
IdcardRecognitionResponse |
idcardRecognition(String image,
String side,
Boolean direction)
Gets the idcard recognition properties of specific image resource.
|
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdownpublic OcrClient(BceClientConfiguration ocrConfig)
ocrConfig - The client configuration options controlling how this client connects to Ocr services
(e.g. proxy settings, retry counts, etc).public BankcardRecognitionResponse bankcardRecognition(String image)
The caller must authenticate with a valid BCE Access Key / Private Key pair.
image - The image data which needs to be base64public BankcardRecognitionResponse bankcardRecognition(BankcardRecognitionRequest request)
The caller must authenticate with a valid BCE Access Key / Private Key pair.
request - The request wrapper object containing all options.public IdcardRecognitionResponse idcardRecognition(String image, String side)
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)public IdcardRecognitionResponse idcardRecognition(String image, String side, Boolean direction)
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)public IdcardRecognitionResponse idcardRecognition(IdcardRecognitionRequest request)
The caller must authenticate with a valid BCE Access Key / Private Key pair.
request - The request wrapper object containing all options.public GeneralRecognitionResponse generalRecognition(String image)
The caller must authenticate with a valid BCE Access Key / Private Key pair.
image - The image data which needs to be base64public GeneralRecognitionResponse generalRecognition(String image, String granularity, String mask, String langType, Boolean direction)
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)public GeneralRecognitionResponse generalRecognition(GeneralRecognitionRequest request)
The caller must authenticate with a valid BCE Access Key / Private Key pair.
request - The request wrapper object containing all options.Copyright © 2023. All rights reserved.