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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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, setRegionBreaker
public OcrClient(Credential credential, String region)
public OcrClient(Credential credential, String region, ClientProfile profile)
public BankCardOCRResponse BankCardOCR(BankCardOCRRequest req) throws TencentCloudSDKException
req
- BankCardOCRRequestTencentCloudSDKException
public GeneralAccurateOCRResponse GeneralAccurateOCR(GeneralAccurateOCRRequest req) throws TencentCloudSDKException
req
- GeneralAccurateOCRRequestTencentCloudSDKException
public GeneralBasicOCRResponse GeneralBasicOCR(GeneralBasicOCRRequest req) throws TencentCloudSDKException
req
- GeneralBasicOCRRequestTencentCloudSDKException
public HKIDCardOCRResponse HKIDCardOCR(HKIDCardOCRRequest req) throws TencentCloudSDKException
req
- HKIDCardOCRRequestTencentCloudSDKException
public HmtResidentPermitOCRResponse HmtResidentPermitOCR(HmtResidentPermitOCRRequest req) throws TencentCloudSDKException
req
- HmtResidentPermitOCRRequestTencentCloudSDKException
public 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
- IDCardOCRRequestTencentCloudSDKException
public LicensePlateOCRResponse LicensePlateOCR(LicensePlateOCRRequest req) throws TencentCloudSDKException
req
- LicensePlateOCRRequestTencentCloudSDKException
public MLIDCardOCRResponse MLIDCardOCR(MLIDCardOCRRequest req) throws TencentCloudSDKException
req
- MLIDCardOCRRequestTencentCloudSDKException
public MLIDPassportOCRResponse MLIDPassportOCR(MLIDPassportOCRRequest req) throws TencentCloudSDKException
req
- MLIDPassportOCRRequestTencentCloudSDKException
public MainlandPermitOCRResponse MainlandPermitOCR(MainlandPermitOCRRequest req) throws TencentCloudSDKException
req
- MainlandPermitOCRRequestTencentCloudSDKException
public PermitOCRResponse PermitOCR(PermitOCRRequest req) throws TencentCloudSDKException
req
- PermitOCRRequestTencentCloudSDKException
public 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
- RecognizeGeneralInvoiceRequestTencentCloudSDKException
public RecognizeIndonesiaIDCardOCRResponse RecognizeIndonesiaIDCardOCR(RecognizeIndonesiaIDCardOCRRequest req) throws TencentCloudSDKException
req
- RecognizeIndonesiaIDCardOCRRequestTencentCloudSDKException
public RecognizeKoreanDrivingLicenseOCRResponse RecognizeKoreanDrivingLicenseOCR(RecognizeKoreanDrivingLicenseOCRRequest req) throws TencentCloudSDKException
req
- RecognizeKoreanDrivingLicenseOCRRequestTencentCloudSDKException
public RecognizeKoreanIDCardOCRResponse RecognizeKoreanIDCardOCR(RecognizeKoreanIDCardOCRRequest req) throws TencentCloudSDKException
req
- RecognizeKoreanIDCardOCRRequestTencentCloudSDKException
public RecognizeMainlandIDCardOCRResponse RecognizeMainlandIDCardOCR(RecognizeMainlandIDCardOCRRequest 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
- RecognizeMainlandIDCardOCRRequestTencentCloudSDKException
public RecognizePhilippinesDrivingLicenseOCRResponse RecognizePhilippinesDrivingLicenseOCR(RecognizePhilippinesDrivingLicenseOCRRequest req) throws TencentCloudSDKException
req
- RecognizePhilippinesDrivingLicenseOCRRequestTencentCloudSDKException
public RecognizePhilippinesSssIDOCRResponse RecognizePhilippinesSssIDOCR(RecognizePhilippinesSssIDOCRRequest req) throws TencentCloudSDKException
req
- RecognizePhilippinesSssIDOCRRequestTencentCloudSDKException
public RecognizePhilippinesTinIDOCRResponse RecognizePhilippinesTinIDOCR(RecognizePhilippinesTinIDOCRRequest req) throws TencentCloudSDKException
req
- RecognizePhilippinesTinIDOCRRequestTencentCloudSDKException
public RecognizePhilippinesUMIDOCRResponse RecognizePhilippinesUMIDOCR(RecognizePhilippinesUMIDOCRRequest req) throws TencentCloudSDKException
req
- RecognizePhilippinesUMIDOCRRequestTencentCloudSDKException
public RecognizePhilippinesVoteIDOCRResponse RecognizePhilippinesVoteIDOCR(RecognizePhilippinesVoteIDOCRRequest req) throws TencentCloudSDKException
req
- RecognizePhilippinesVoteIDOCRRequestTencentCloudSDKException
public RecognizeTableAccurateOCRResponse RecognizeTableAccurateOCR(RecognizeTableAccurateOCRRequest req) throws TencentCloudSDKException
req
- RecognizeTableAccurateOCRRequestTencentCloudSDKException
public RecognizeThaiIDCardOCRResponse RecognizeThaiIDCardOCR(RecognizeThaiIDCardOCRRequest req) throws TencentCloudSDKException
req
- RecognizeThaiIDCardOCRRequestTencentCloudSDKException
public SealOCRResponse SealOCR(SealOCRRequest req) throws TencentCloudSDKException
req
- SealOCRRequestTencentCloudSDKException
public SmartStructuralOCRV2Response SmartStructuralOCRV2(SmartStructuralOCRV2Request req) throws TencentCloudSDKException
req
- SmartStructuralOCRV2RequestTencentCloudSDKException
public TableOCRResponse TableOCR(TableOCRRequest req) throws TencentCloudSDKException
req
- TableOCRRequestTencentCloudSDKException
public VinOCRResponse VinOCR(VinOCRRequest req) throws TencentCloudSDKException
req
- VinOCRRequestTencentCloudSDKException
Copyright © 2024. All rights reserved.