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.
|
ExtractDocMultiResponse |
ExtractDocMulti(ExtractDocMultiRequest req)
This API supports identifying and extracting field information in structured scenarios such as complex scenarios and multiple formats.
|
GeneralAccurateOCRResponse |
GeneralAccurateOCR(GeneralAccurateOCRRequest req)
This API is used to detect and recognize characters in an image.
|
GeneralBasicOCRResponse |
GeneralBasicOCR(GeneralBasicOCRRequest req)
This API is used to detect and recognize characters in an image in the following 20 languages: Chinese, English, Japanese, Korean, Spanish, French, German, Portuguese, Vietnamese, Malay, Russian, Italian, Dutch, Swedish, Finnish, Danish, Norwegian, Hungarian, Thai, and Arabic.
|
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.
|
HmtResidentPermitOCRResponse |
HmtResidentPermitOCR(HmtResidentPermitOCRRequest req)
This API is used to recognize key fields on the front and back sides of a residence permit for Hong Kong, Macao, or Taiwan residents, including name, gender, date of birth, address, ID number, issuing authority, validity period, number of issues, and permit number.
|
IDCardOCRResponse |
IDCardOCR(IDCardOCRRequest req)
This API is used to recognize all fields on the front and back sides of a second-generation resident identity card for the Chinese mainland: name, gender, ethnicity, date of birth, domicile, identification number, issuing authority, and validity period, with a recognition accuracy of over 99%.
|
LicensePlateOCRResponse |
LicensePlateOCR(LicensePlateOCRRequest req)
This API is used to recognize a license plate attached to a motor vehicle in the Chinese mainland and return the regional code, license plate number, and license plate color.
|
MainlandPermitOCRResponse |
MainlandPermitOCR(MainlandPermitOCRRequest req)
This API is used to recognize all fields on the front of a mainland travel permit for Hong Kong, Macao, or Taiwan residents: name in Chinese, name in English, gender, date of birth, issuing authority, validity period, document number, place of issuance, number of issues, and document type.
|
MLIDCardOCRResponse |
MLIDCardOCR(MLIDCardOCRRequest req)
This API is used to recognize a Malaysian identity card, including identity card number, name, gender, and address.
|
MLIDPassportOCRResponse |
MLIDPassportOCR(MLIDPassportOCRRequest req)
This API is used to recognize a passport issued in Hong Kong/Macao/Taiwan (China) or other countries/regions.
|
PermitOCRResponse |
PermitOCR(PermitOCRRequest req)
This API is used to recognize the fields on an exit/entry permit (card) for traveling to and from Hong Kong, Macao, or Taiwan, including place of issuance, issuing authority, validity period, gender, date of birth, name in English, name in Chinese, and document number.
|
RecognizeBrazilCommonOCRResponse |
RecognizeBrazilCommonOCR(RecognizeBrazilCommonOCRRequest req)
This API is used to identify Brazil common documents.
|
RecognizeBrazilDriverLicenseOCRResponse |
RecognizeBrazilDriverLicenseOCR(RecognizeBrazilDriverLicenseOCRRequest req)
This interface supports identification of the front and back of Brazilian driver's license.
|
RecognizeBrazilIDCardOCRResponse |
RecognizeBrazilIDCardOCR(RecognizeBrazilIDCardOCRRequest req)
This interface supports identification of the front and back of Brazilian ID license.
|
RecognizeBrazilRNEOCRResponse |
RecognizeBrazilRNEOCR(RecognizeBrazilRNEOCRRequest req)
Brazil RNE document recognition Default interface request frequency limit: 5 times/second
|
RecognizeBrazilRNMOCRResponse |
RecognizeBrazilRNMOCR(RecognizeBrazilRNMOCRRequest req)
This interface supports identification of the front and back of Brazilian RNM license.
|
RecognizeGeneralInvoiceResponse |
RecognizeGeneralInvoice(RecognizeGeneralInvoiceRequest req)
This API is used to recognize various types of invoices or tickets in an image or PDF file.
|
RecognizeIndonesiaIDCardOCRResponse |
RecognizeIndonesiaIDCardOCR(RecognizeIndonesiaIDCardOCRRequest req)
This API is used to recognize an Indonesian identity card.
|
RecognizeKoreanDrivingLicenseOCRResponse |
RecognizeKoreanDrivingLicenseOCR(RecognizeKoreanDrivingLicenseOCRRequest req)
This API is used to recognize a South Korean driver's license.
|
RecognizeKoreanIDCardOCRResponse |
RecognizeKoreanIDCardOCR(RecognizeKoreanIDCardOCRRequest req)
This API is used to recognize a South Korean ID card.
|
RecognizeMacaoIDCardOCRResponse |
RecognizeMacaoIDCardOCR(RecognizeMacaoIDCardOCRRequest req)
This API is used to recognize key fields on the photo side of a Macao (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.
|
RecognizeMainlandIDCardOCRResponse |
RecognizeMainlandIDCardOCR(RecognizeMainlandIDCardOCRRequest req)
This interface supports the identification of all fields on the front and back of the second-generation ID card for mainland Chinese residents.Including name, gender, ethnicity, date of birth, address, citizen ID number, issuing authority, and validity period, the identification accuracy reaches more than 99%.In addition, this interface also supports a variety of value-added capabilities to meet the needs of different scenarios.
|
RecognizeMexicoVTIDResponse |
RecognizeMexicoVTID(RecognizeMexicoVTIDRequest req)
This interface supports identification of the front and back of Mexican Voter ID Card.
|
RecognizePhilippinesDrivingLicenseOCRResponse |
RecognizePhilippinesDrivingLicenseOCR(RecognizePhilippinesDrivingLicenseOCRRequest req)
This API is used to recognize a Philippine driver's license.
|
RecognizePhilippinesSssIDOCRResponse |
RecognizePhilippinesSssIDOCR(RecognizePhilippinesSssIDOCRRequest req)
This API is used to recognize a Philippine SSSID/UMID card.
|
RecognizePhilippinesTinIDOCRResponse |
RecognizePhilippinesTinIDOCR(RecognizePhilippinesTinIDOCRRequest req)
This API is used to recognize a Philippine TIN ID card.
|
RecognizePhilippinesUMIDOCRResponse |
RecognizePhilippinesUMIDOCR(RecognizePhilippinesUMIDOCRRequest req)
This API is used to recognize a Philippine Unified Multi-Purpose ID (UMID) card.
|
RecognizePhilippinesVoteIDOCRResponse |
RecognizePhilippinesVoteIDOCR(RecognizePhilippinesVoteIDOCRRequest req)
This API is used to recognize a Philippine voters ID card.
|
RecognizeSingaporeIDCardOCRResponse |
RecognizeSingaporeIDCardOCR(RecognizeSingaporeIDCardOCRRequest req)
This interface supports the identification of all fields on the front side of ID card for Singapore residents.The identification accuracy reaches more than 99%.In addition, this interface also supports a variety of value-added capabilities to meet the needs of different scenarios.
|
RecognizeTableAccurateOCRResponse |
RecognizeTableAccurateOCR(RecognizeTableAccurateOCRRequest req)
This API is used to recognize regular tables, borderless tables, or multi-tables in images or PDF files containing Chinese and English texts.
|
RecognizeThaiIDCardOCRResponse |
RecognizeThaiIDCardOCR(RecognizeThaiIDCardOCRRequest req)
This API is used to recognize the fields on a Thai identity card, including name in Thai, name in English, address, date of birth, identification number, date of issue, and date of expiry.
|
RecognizeThaiPinkCardResponse |
RecognizeThaiPinkCard(RecognizeThaiPinkCardRequest req)
This API is used to recognize the fields on a Thai identity card, including name in Thai, name in English, address, date of birth, identification number, date of issue, and date of expiry.
|
SealOCRResponse |
SealOCR(SealOCRRequest req)
This API is used to recognize various types of seals, including invoice seals and finance seals.
|
SmartStructuralOCRV2Response |
SmartStructuralOCRV2(SmartStructuralOCRV2Request req)
This API is used to recognize fields from cards, documents, bills, forms, contracts, and other structured information.
|
SmartStructuralProResponse |
SmartStructuralPro(SmartStructuralProRequest req)
This API is used to recognize fields from cards, documents, bills, forms, contracts, and other structured information.
|
TableOCRResponse |
TableOCR(TableOCRRequest req)
This API is used to detect and recognize Chinese and English forms in images.
|
VinOCRResponse |
VinOCR(VinOCRRequest req)
This API is used to recognize the vehicle identification number (VIN) in an image.
|
call, callOctetStream, getClientProfile, getCredential, getRegion, getRegionBreaker, internalRequest, internalRequest, internalRequestRaw, processResponseJson, processResponseSSE, retry, setClientProfile, setCredential, setRegion, setRegionBreakerpublic OcrClient(Credential credential, String region)
public OcrClient(Credential credential, String region, ClientProfile profile)
public BankCardOCRResponse BankCardOCR(BankCardOCRRequest req) throws TencentCloudSDKException
req - BankCardOCRRequestTencentCloudSDKExceptionpublic ExtractDocMultiResponse ExtractDocMulti(ExtractDocMultiRequest req) throws TencentCloudSDKException
req - ExtractDocMultiRequestTencentCloudSDKExceptionpublic GeneralAccurateOCRResponse GeneralAccurateOCR(GeneralAccurateOCRRequest req) throws TencentCloudSDKException
req - GeneralAccurateOCRRequestTencentCloudSDKExceptionpublic GeneralBasicOCRResponse GeneralBasicOCR(GeneralBasicOCRRequest req) throws TencentCloudSDKException
req - GeneralBasicOCRRequestTencentCloudSDKExceptionpublic HKIDCardOCRResponse HKIDCardOCR(HKIDCardOCRRequest req) throws TencentCloudSDKException
req - HKIDCardOCRRequestTencentCloudSDKExceptionpublic HmtResidentPermitOCRResponse HmtResidentPermitOCR(HmtResidentPermitOCRRequest req) throws TencentCloudSDKException
req - HmtResidentPermitOCRRequestTencentCloudSDKExceptionpublic IDCardOCRResponse IDCardOCR(IDCardOCRRequest req) throws TencentCloudSDKException
| Capability | Description |
|---|---|
| Cropping | Crops the ID card photo (by removing extra edges outside the ID card and automatically correcting the shooting angle). |
| Crops the profile photo (by automatically cutting out the face area in the ID card). | |
| Warning | Warns about invalid ID card validity periods. |
| Warns about incomplete ID card borders. | |
| Warns about photocopied images. | |
| Warns about spoofed images. | |
| Warns about border and frame occlusions. | |
| Warns about temporary ID cards. | |
| Warns about photoshopped images. | |
| Warns about blurry ID card images (blurriness can be determined based on the image quality score). |
req - IDCardOCRRequestTencentCloudSDKExceptionpublic LicensePlateOCRResponse LicensePlateOCR(LicensePlateOCRRequest req) throws TencentCloudSDKException
req - LicensePlateOCRRequestTencentCloudSDKExceptionpublic MLIDCardOCRResponse MLIDCardOCR(MLIDCardOCRRequest req) throws TencentCloudSDKException
req - MLIDCardOCRRequestTencentCloudSDKExceptionpublic MLIDPassportOCRResponse MLIDPassportOCR(MLIDPassportOCRRequest req) throws TencentCloudSDKException
req - MLIDPassportOCRRequestTencentCloudSDKExceptionpublic MainlandPermitOCRResponse MainlandPermitOCR(MainlandPermitOCRRequest req) throws TencentCloudSDKException
req - MainlandPermitOCRRequestTencentCloudSDKExceptionpublic PermitOCRResponse PermitOCR(PermitOCRRequest req) throws TencentCloudSDKException
req - PermitOCRRequestTencentCloudSDKExceptionpublic RecognizeBrazilCommonOCRResponse RecognizeBrazilCommonOCR(RecognizeBrazilCommonOCRRequest req) throws TencentCloudSDKException
req - RecognizeBrazilCommonOCRRequestTencentCloudSDKExceptionpublic RecognizeBrazilDriverLicenseOCRResponse RecognizeBrazilDriverLicenseOCR(RecognizeBrazilDriverLicenseOCRRequest req) throws TencentCloudSDKException
req - RecognizeBrazilDriverLicenseOCRRequestTencentCloudSDKExceptionpublic RecognizeBrazilIDCardOCRResponse RecognizeBrazilIDCardOCR(RecognizeBrazilIDCardOCRRequest req) throws TencentCloudSDKException
req - RecognizeBrazilIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeBrazilRNEOCRResponse RecognizeBrazilRNEOCR(RecognizeBrazilRNEOCRRequest req) throws TencentCloudSDKException
req - RecognizeBrazilRNEOCRRequestTencentCloudSDKExceptionpublic RecognizeBrazilRNMOCRResponse RecognizeBrazilRNMOCR(RecognizeBrazilRNMOCRRequest req) throws TencentCloudSDKException
req - RecognizeBrazilRNMOCRRequestTencentCloudSDKExceptionpublic RecognizeGeneralInvoiceResponse RecognizeGeneralInvoice(RecognizeGeneralInvoiceRequest req) throws TencentCloudSDKException
| SubType | TypeDescription | Type |
|---|---|---|
| VatSpecialInvoice | Special VAT invoice | 3 |
| VatCommonInvoice | General VAT invoice | 3 |
| VatElectronicCommonInvoice | Electronic general VAT invoice | 3 |
| VatElectronicSpecialInvoice | Electronic special VAT invoice | 3 |
| VatElectronicInvoiceBlockchain | Blockchain electronic invoice | 3 |
| VatElectronicInvoiceToll | Electronic general VAT invoice (toll) | 3 |
| VatElectronicSpecialInvoiceFull | Electronic invoice (special) | 16 |
| VatElectronicInvoiceFull | Electronic invoice (general) | 16 |
| MotorVehicleSaleInvoice | Motor vehicle sales invoice | 12 |
| UsedCarPurchaseInvoice | Used car invoice | 12 |
| VatInvoiceRoll | General VAT invoice (roll) | 11 |
| TaxiTicket | Taxi receipt | 0 |
| QuotaInvoice | Quota invoice | 1 |
| TrainTicket | Train ticket | 2 |
| AirTransport | Itinerary/Receipt of e-ticket for air transportation | 5 |
| MachinePrintedInvoice | General machine-printed invoice | 8 |
| BusInvoice | Bus ticket | 9 |
| ShippingInvoice | Ship ticket | 10 |
| NonTaxIncomeGeneralBill | General receipt for non-tax revenue | 15 |
| NonTaxIncomeElectronicBill | General payment voucher for non-tax revenue (electronic) | 15 |
| TollInvoice | Toll receipt | 13 |
| OtherInvoice | Other | -1 |
req - RecognizeGeneralInvoiceRequestTencentCloudSDKExceptionpublic RecognizeIndonesiaIDCardOCRResponse RecognizeIndonesiaIDCardOCR(RecognizeIndonesiaIDCardOCRRequest req) throws TencentCloudSDKException
req - RecognizeIndonesiaIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeKoreanDrivingLicenseOCRResponse RecognizeKoreanDrivingLicenseOCR(RecognizeKoreanDrivingLicenseOCRRequest req) throws TencentCloudSDKException
req - RecognizeKoreanDrivingLicenseOCRRequestTencentCloudSDKExceptionpublic RecognizeKoreanIDCardOCRResponse RecognizeKoreanIDCardOCR(RecognizeKoreanIDCardOCRRequest req) throws TencentCloudSDKException
req - RecognizeKoreanIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeMacaoIDCardOCRResponse RecognizeMacaoIDCardOCR(RecognizeMacaoIDCardOCRRequest req) throws TencentCloudSDKException
req - RecognizeMacaoIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeMainlandIDCardOCRResponse RecognizeMainlandIDCardOCR(RecognizeMainlandIDCardOCRRequest req) throws TencentCloudSDKException
| Value-added ability | Ability items |
|---|---|
| Alarm function | |
| ID card photocopy warning | |
| ID card on-screen display warning | |
| Alarm for occlusion in the ID card frame | |
| ID card reflective warning | |
| Blurry picture warning |
req - RecognizeMainlandIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeMexicoVTIDResponse RecognizeMexicoVTID(RecognizeMexicoVTIDRequest req) throws TencentCloudSDKException
req - RecognizeMexicoVTIDRequestTencentCloudSDKExceptionpublic RecognizePhilippinesDrivingLicenseOCRResponse RecognizePhilippinesDrivingLicenseOCR(RecognizePhilippinesDrivingLicenseOCRRequest req) throws TencentCloudSDKException
req - RecognizePhilippinesDrivingLicenseOCRRequestTencentCloudSDKExceptionpublic RecognizePhilippinesSssIDOCRResponse RecognizePhilippinesSssIDOCR(RecognizePhilippinesSssIDOCRRequest req) throws TencentCloudSDKException
req - RecognizePhilippinesSssIDOCRRequestTencentCloudSDKExceptionpublic RecognizePhilippinesTinIDOCRResponse RecognizePhilippinesTinIDOCR(RecognizePhilippinesTinIDOCRRequest req) throws TencentCloudSDKException
req - RecognizePhilippinesTinIDOCRRequestTencentCloudSDKExceptionpublic RecognizePhilippinesUMIDOCRResponse RecognizePhilippinesUMIDOCR(RecognizePhilippinesUMIDOCRRequest req) throws TencentCloudSDKException
req - RecognizePhilippinesUMIDOCRRequestTencentCloudSDKExceptionpublic RecognizePhilippinesVoteIDOCRResponse RecognizePhilippinesVoteIDOCR(RecognizePhilippinesVoteIDOCRRequest req) throws TencentCloudSDKException
req - RecognizePhilippinesVoteIDOCRRequestTencentCloudSDKExceptionpublic RecognizeSingaporeIDCardOCRResponse RecognizeSingaporeIDCardOCR(RecognizeSingaporeIDCardOCRRequest req) throws TencentCloudSDKException
| Value-added ability | Ability items |
|---|---|
| Alarm function | |
| ID card copy warning | |
| ID card copy warning | |
| Alarm for occlusion in the ID card frame | |
| ID card reflective warning | |
| Blurry picture warning |
req - RecognizeSingaporeIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeTableAccurateOCRResponse RecognizeTableAccurateOCR(RecognizeTableAccurateOCRRequest req) throws TencentCloudSDKException
req - RecognizeTableAccurateOCRRequestTencentCloudSDKExceptionpublic RecognizeThaiIDCardOCRResponse RecognizeThaiIDCardOCR(RecognizeThaiIDCardOCRRequest req) throws TencentCloudSDKException
req - RecognizeThaiIDCardOCRRequestTencentCloudSDKExceptionpublic RecognizeThaiPinkCardResponse RecognizeThaiPinkCard(RecognizeThaiPinkCardRequest req) throws TencentCloudSDKException
req - RecognizeThaiPinkCardRequestTencentCloudSDKExceptionpublic SealOCRResponse SealOCR(SealOCRRequest req) throws TencentCloudSDKException
req - SealOCRRequestTencentCloudSDKExceptionpublic SmartStructuralOCRV2Response SmartStructuralOCRV2(SmartStructuralOCRV2Request req) throws TencentCloudSDKException
req - SmartStructuralOCRV2RequestTencentCloudSDKExceptionpublic SmartStructuralProResponse SmartStructuralPro(SmartStructuralProRequest req) throws TencentCloudSDKException
req - SmartStructuralProRequestTencentCloudSDKExceptionpublic TableOCRResponse TableOCR(TableOCRRequest req) throws TencentCloudSDKException
req - TableOCRRequestTencentCloudSDKExceptionpublic VinOCRResponse VinOCR(VinOCRRequest req) throws TencentCloudSDKException
req - VinOCRRequestTencentCloudSDKExceptionCopyright © 2025. All rights reserved.