Package glair.vision.api
Class Ocr
java.lang.Object
glair.vision.api.Ocr
The Ocr class provides methods for performing Optical Character Recognition (OCR)
operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerform OCR on a BPKB image using default configuration settings.bpkb(BpkbParam param, VisionSettings newVisionSettings) Perform OCR on a BPKB image using custom configuration settings.generalDocument(String imagePath) Perform OCR on a General Document image using default configuration settings.generalDocument(String imagePath, VisionSettings newVisionSettings) Perform OCR on a General Document image using custom configuration settings.Perform OCR on an Invoice image using default configuration settings.invoice(String imagePath, VisionSettings newVisionSettings) Perform OCR on an Invoice image using custom configuration settings.Perform OCR on an KK image using default configuration settings.kk(String imagePath, VisionSettings newVisionSettings) Perform OCR on an KK image using custom configuration settings.Perform OCR on a KTP image using default configuration settings.ktp(KtpParam param, VisionSettings newVisionSettings) Perform OCR on a KTP image using custom configuration settings.Get access to KTP Sessions related operations.licensePlate(String imagePath) Perform OCR on a License Plate image using default configuration settings.licensePlate(String imagePath, VisionSettings newVisionSettings) Perform OCR on a License Plate image using custom configuration settings.Perform OCR on an NPWP image using default configuration settings.npwp(String imagePath, VisionSettings newVisionSettings) Perform OCR on an NPWP image using custom configuration settings.Get access to NPWP Sessions related operations.Perform OCR on a Passport image using default configuration settings.passport(String imagePath, VisionSettings newVisionSettings) Perform OCR on a Passport image using custom configuration settings.Perform OCR on a Receipt image using default configuration settings.receipt(String imagePath, VisionSettings newVisionSettings) Perform OCR on a Receipt image using custom configuration settings.Perform OCR on an STNK image using default configuration settings.stnk(String imagePath, VisionSettings newVisionSettings) Perform OCR on an STNK image using custom configuration settings.
-
Constructor Details
-
Ocr
Constructs an Ocr instance with the provided configuration.- Parameters:
config- The configuration settings to use for OCR operations.
-
-
Method Details
-
ktpSessions
Get access to KTP Sessions related operations.- Returns:
- An instance of KtpSessions for KTP operations.
-
npwpSessions
Get access to NPWP Sessions related operations.- Returns:
- An instance of NpwpSessions for NPWP operations.
-
ktp
Perform OCR on a KTP image using default configuration settings.- Parameters:
param- The OCR parameters, including the path to the KTP image file and an optional qualities detector setting.- Returns:
- The OCR result for the KTP image.
- Throws:
Exception- If an error occurs during the OCR process.
-
ktp
Perform OCR on a KTP image using custom configuration settings.- Parameters:
param- The OCR parameters, including the path to the KTP image file and an optional qualities detector setting.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the KTP image.
- Throws:
Exception- If an error occurs during the OCR process.
-
npwp
Perform OCR on an NPWP image using default configuration settings.- Parameters:
imagePath- The path to the NPWP image file.- Returns:
- The OCR result for the NPWP image.
- Throws:
Exception- If an error occurs during the OCR process.
-
npwp
Perform OCR on an NPWP image using custom configuration settings.- Parameters:
imagePath- The path to the NPWP image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the NPWP image.
- Throws:
Exception- If an error occurs during the OCR process.
-
kk
Perform OCR on an KK image using default configuration settings.- Parameters:
imagePath- The path to the KK image file.- Returns:
- The OCR result for the KK image.
- Throws:
Exception- If an error occurs during the OCR process.
-
kk
Perform OCR on an KK image using custom configuration settings.- Parameters:
imagePath- The path to the KK image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the KK image.
- Throws:
Exception- If an error occurs during the OCR process.
-
stnk
Perform OCR on an STNK image using default configuration settings.- Parameters:
imagePath- The path to the STNK image file.- Returns:
- The OCR result for the STNK image.
- Throws:
Exception- If an error occurs during the OCR process.
-
stnk
Perform OCR on an STNK image using custom configuration settings.- Parameters:
imagePath- The path to the STNK image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the STNK image.
- Throws:
Exception- If an error occurs during the OCR process.
-
bpkb
Perform OCR on a BPKB image using default configuration settings.- Parameters:
param- The parameters for OCR, including the path to the BPKB image file and an optional page number (1-4).- Returns:
- The OCR result for the BPKB image.
- Throws:
Exception- If an error occurs during the OCR process, such as if the file does not exist.
-
bpkb
Perform OCR on a BPKB image using custom configuration settings.- Parameters:
param- The parameters for OCR, including the path to the BPKB image file and an optional page number (1-4).newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the BPKB image.
- Throws:
Exception- If an error occurs during the OCR process, such as if the file does not exist.
-
passport
Perform OCR on a Passport image using default configuration settings.- Parameters:
imagePath- The path to the Passport image file.- Returns:
- The OCR result for the Passport image.
- Throws:
Exception- If an error occurs during the OCR process.
-
passport
Perform OCR on a Passport image using custom configuration settings.- Parameters:
imagePath- The path to the Passport image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the Passport image.
- Throws:
Exception- If an error occurs during the OCR process.
-
licensePlate
Perform OCR on a License Plate image using default configuration settings.- Parameters:
imagePath- The path to the License Plate image file.- Returns:
- The OCR result for the License Plate image.
- Throws:
Exception- If an error occurs during the OCR process.
-
licensePlate
Perform OCR on a License Plate image using custom configuration settings.- Parameters:
imagePath- The path to the License Plate image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the License Plate image.
- Throws:
Exception- If an error occurs during the OCR process.
-
generalDocument
Perform OCR on a General Document image using default configuration settings.- Parameters:
imagePath- The path to the General Document image file.- Returns:
- The OCR result for the General Document image.
- Throws:
Exception- If an error occurs during the OCR process.
-
generalDocument
Perform OCR on a General Document image using custom configuration settings.- Parameters:
imagePath- The path to the General Document image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the General Document image.
- Throws:
Exception- If an error occurs during the OCR process.
-
invoice
Perform OCR on an Invoice image using default configuration settings.- Parameters:
imagePath- The path to the Invoice image file.- Returns:
- The OCR result for the Invoice image.
- Throws:
Exception- If an error occurs during the OCR process.
-
invoice
Perform OCR on an Invoice image using custom configuration settings.- Parameters:
imagePath- The path to the Invoice image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the Invoice image.
- Throws:
Exception- If an error occurs during the OCR process.
-
receipt
Perform OCR on a Receipt image using default configuration settings.- Parameters:
imagePath- The path to the Receipt image file.- Returns:
- The OCR result for the Receipt image.
- Throws:
Exception- If an error occurs during the OCR process.
-
receipt
Perform OCR on a Receipt image using custom configuration settings.- Parameters:
imagePath- The path to the Receipt image file.newVisionSettings- The custom vision settings to use.- Returns:
- The OCR result for the Receipt image.
- Throws:
Exception- If an error occurs during the OCR process.
-