public class OcrClient extends AbstractClient
gson, HTTP_RSP_OK, SDK_VERSION| Constructor and Description |
|---|
OcrClient(Credential credential,
String region) |
OcrClient(Credential credential,
String region,
ClientProfile profile) |
| Modifier and Type | Method and Description |
|---|---|
BankCardOCRResponse |
BankCardOCR(BankCardOCRRequest req)
This API is used to detect and recognize key fields such as the card number, bank information, and expiration date on mainstream bank cards in Mainland China.
|
GeneralBasicOCRResponse |
GeneralBasicOCR(GeneralBasicOCRRequest req)
This API is used to detect and recognize characters in an image in the following 19 languages: Chinese, English, Japanese, Korean, Spanish, French, German, Portuguese, Vietnamese, Malay, Russian, Italian, Dutch, Swedish, Finnish, Danish, Norwegian, Hungarian, and Thai.
|
HKIDCardOCRResponse |
HKIDCardOCR(HKIDCardOCRRequest req)
This API is used to recognize key fields on the photo side of a Hong Kong (China) identity card, including name in Chinese, name in English, telecode for name, date of birth, gender, document symbol, date of the first issue, date of the last receipt, identity card number, and permanent residency attribute.
|
MLIDCardOCRResponse |
MLIDCardOCR(MLIDCardOCRRequest req)
This API is used to recognize a Malaysian identity card.
|
MLIDPassportOCRResponse |
MLIDPassportOCR(MLIDPassportOCRRequest req)
This API is used to recognize a passport issued outside Mainland China.
|
call, getClientProfile, getCredential, getRegion, internalRequest, setClientProfile, setCredential, setRegionpublic OcrClient(Credential credential, String region)
public OcrClient(Credential credential, String region, ClientProfile profile)
public BankCardOCRResponse BankCardOCR(BankCardOCRRequest req) throws TencentCloudSDKException
req - BankCardOCRRequestTencentCloudSDKExceptionpublic GeneralBasicOCRResponse GeneralBasicOCR(GeneralBasicOCRRequest req) throws TencentCloudSDKException
| **(Recommended)** General Print Recognition | **(Recommended)** General Print Recognition (High-Precision) | General Print Recognition (Simplified) | |
|---|---|---|---|
| Use case | It is suitable for recognition of printed text in all general scenarios | It is suitable for content with high recognition difficulty such as a large number of characters, long strings of digits, small characters, blurry characters, and tilted text | It is suitable for fast text recognition, which compromises the accuracy and recall rate but is more cost-effective |
| Recognition accuracy rate | 96% | 99% | 91% |
| Price | Medium | High | Low |
| Supported languages | Chinese, English, Chinese-English, Japanese, Korean, Spanish, French, German, Portuguese, Vietnamese, Malay, Russian, Italian, Dutch, Swedish, Finnish, Danish, Norwegian, Hungarian, and Thai | Chinese, English, and Chinese-English | Chinese, English, and Chinese-English |
| Automatic language detection | Supported | Supported | Supported |
| Return of text line coordinates | Supported | Supported | Supported |
| Automatic rotation correction | Rotation recognition is supported, and the angle information can be returned | Rotation recognition is supported, but no angle information can be returned | Rotation recognition is supported, and the angle information can be returned |
req - GeneralBasicOCRRequestTencentCloudSDKExceptionpublic HKIDCardOCRResponse HKIDCardOCR(HKIDCardOCRRequest req) throws TencentCloudSDKException
req - HKIDCardOCRRequestTencentCloudSDKExceptionpublic MLIDCardOCRResponse MLIDCardOCR(MLIDCardOCRRequest req) throws TencentCloudSDKException
req - MLIDCardOCRRequestTencentCloudSDKExceptionpublic MLIDPassportOCRResponse MLIDPassportOCR(MLIDPassportOCRRequest req) throws TencentCloudSDKException
req - MLIDPassportOCRRequestTencentCloudSDKExceptionCopyright © 2020. All rights reserved.