Aspose.OCR Cloud is an optical character recognition as a service. With it, you can easily add OCR functionality to almost any device or platform, including netbooks, mini PCs, or even entry-level smartphones.
Our engine can read text from images, photos, screenshots and scanned PDFs in a wide variety of European, Cyrillic and Oriental fonts, returning results in the most popular document formats. Powerful built-in image processing filters based on neural networks automatically correct skewed and distorted images, automatically remove dirt, smudges, scratches, glare and other image defects that can affect recognition accuracy. To further improve the results, Aspose.OCR Cloud has a built-in spell checker that automatically replaces misspelled words and saves you the trouble of manually correcting the recognition results.
Even the complex recognition tasks can be done with a couple of API calls. To make interacting with Aspose.OCR Cloud services from .NET applications even easier, we provide the software development kit (SDK) for .NET. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple classes.
Aspose.OCR Cloud SDK for .NET is open source under the MIT license. You can freely use it for any projects, including commercial and proprietary applications, as well as modify any part of its code.
Image to Text | Image to Searchable PDF | PDF OCR | Receipt Scanner |
---|---|---|---|
A summary of recent changes, enhancements and bug fixes in Aspose.OCR Cloud SDK for Android 23.12.0 release:
Key | Summary | Category |
---|---|---|
OCR‑3737 | Added a free API for evaluating image recognition without authorization. Some restrictions apply. See below for details. |
New feature |
The following public APIs have been introduced in this release:
The following new classes have been added:
Class | Description |
---|---|
RecognizeImageTrialApi |
Image recognition API that works without authorization. |
Important: In recognition results, 10% of the words are substituted with asterisks (*
). The sequence of masked words remains unchanged upon re-submitting the identical image for recognition.
No changes
No changes.
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-ocr-cloud-android</artifactId>
<version>23.12.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'aspose-ocr-cloud-android' jar has been published to maven central.
mavenLocal() // Needed if the 'aspose-ocr-cloud-android' jar has been published to the local maven repo.
}
dependencies {
implementation "com.aspose:aspose-ocr-cloud-android:23.12.0"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/aspose-ocr-cloud-android-23.12.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import Aspose.OCR.Cloud.SDK.RecognizeImageApi;
import Aspose.OCR.Cloud.SDK.model.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Example {
public static void main(String[] args) {
String clientId = "";
String clientSecret = "";
// Creating new API instance with your credentials
RecognizeImageApi api = new RecognizeImageApi(clientId, clientSecret);
// Creating recognition settings object
OCRSettingsRecognizeImage settings = new OCRSettingsRecognizeImage();
settings.setLanguage(Language.ENGLISH);
settings.setDsrConfidence(DsrConfidence.DEFAULT);
settings.setDsrMode(DsrMode.NODSRNOFILTER);
settings.setMakeBinarization(false);
settings.setMakeSkewCorrect(false);
settings.setMakeContrastCorrection(false);
settings.setMakeUpsampling(false);
settings.setResultType(ResultType.TEXT);
// Reading image file to array of bytes
String imageFileName = "samples\\latin.png";
byte[] imageData = Files.readAllBytes(Path.of(imageFileName));
// Combining settings and image to request body
OCRRecognizeImageBody requestBody = new OCRRecognizeImageBody();
requestBody.setImage(imageData);
requestBody.setSettings(settings);
// Sending request to cloud API and getting task ID
String taskId = api.postRecognizeImage(requestBody);
// Getting result data with second request
OCRResponse apiResponse = api.getRecognizeImage(taskId);
// Extracting result text from response
System.out.println(new String(apiResponse.getResults().get(0).getData(), StandardCharsets.UTF_8) + "\n\n");
}
}
- Open Examples demo project.
- Provide your Client ID and Client Secret (see Authorization above).
- Run the project.
Aspose.OCR Cloud follows industry standards and best practices to keep your data secure. All communication with OCR REST API is done using JWT authentication, which provides an open-standard, highly secure way to exchange information. Time-limited JWT tokens are generated using Client ID and Client Secret credentials that are specific for each application. To obtain the credentials:
-
Sign in to Aspose Cloud API Dashboard.
-
Go to Applications page.
-
Click Create New Application button.
-
Give the application an easily recognizable name so it can be quickly found in a long list, and provide an optional detailed description.
-
Create the cloud storage by clicking the plus icon and following the required steps. You can also reuse existing storage, if available.
Aspose.OCR Cloud uses its own internal storage, so you can provide the bare minimum storage options:- Type: Internal storage
- Storage name: Any name you like
- Storage mode: Retain files for 24 hours
-
Click Save button.
-
Click the newly created application and copy the values from Client Id and Client Secret fields.
-
Pass in the values from the Client ID and Client Secret fields when initializing the required OCR API.
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
BinarizeImageApi | cancelBinarizeImage | DELETE /v5.0/ocr/BinarizeImage | CancelBinarizeImage |
BinarizeImageApi | getBinarizeImage | GET /v5.0/ocr/BinarizeImage | GetBinarizeImage |
BinarizeImageApi | postBinarizeImage | POST /v5.0/ocr/BinarizeImage | PostBinarizeImage |
ConvertTextToSpeechApi | cancelConvertTextToSpeech | DELETE /v5.0/ocr/ConvertTextToSpeech | CancelConvertTextToSpeech |
ConvertTextToSpeechApi | getConvertTextToSpeech | GET /v5.0/ocr/ConvertTextToSpeech | GetConvertTextToSpeech |
ConvertTextToSpeechApi | postConvertTextToSpeech | POST /v5.0/ocr/ConvertTextToSpeech | PostConvertTextToSpeech |
ConvertTextToSpeechTrialApi | cancelConvertTextToSpeechTrial | DELETE /v5.0/ocr/ConvertTextToSpeechTrial | CancelConvertTextToSpeechTrial |
ConvertTextToSpeechTrialApi | getConvertTextToSpeechTrial | GET /v5.0/ocr/ConvertTextToSpeechTrial | GetConvertTextToSpeechTrial |
ConvertTextToSpeechTrialApi | postConvertTextToSpeechTrial | POST /v5.0/ocr/ConvertTextToSpeechTrial | PostConvertTextToSpeechTrial |
DeskewImageApi | cancelDeskewImage | DELETE /v5.0/ocr/DeskewImage | CancelDeskewImage |
DeskewImageApi | getDeskewImage | GET /v5.0/ocr/DeskewImage | GetDeskewImage |
DeskewImageApi | postDeskewImage | POST /v5.0/ocr/DeskewImage | PostDeskewImage |
DetectRegionsApi | cancelDetectRegions | DELETE /v5.0/ocr/DetectRegions | CancelDetectRegions |
DetectRegionsApi | getDetectRegions | GET /v5.0/ocr/DetectRegions | GetDetectRegions |
DetectRegionsApi | postDetectRegions | POST /v5.0/ocr/DetectRegions | PostDetectRegions |
DewarpImageApi | cancelDewarpImage | DELETE /v5.0/ocr/DewarpImage | CancelDewarpImage |
DewarpImageApi | getDewarpImage | GET /v5.0/ocr/DewarpImage | GetDewarpImage |
DewarpImageApi | postDewarpImage | POST /v5.0/ocr/DewarpImage | PostDewarpImage |
DjVu2PdfApi | cancelDjVu2PDF | DELETE /v5.0/ocr/DjVu2PDF | CancelDjVu2PDF |
DjVu2PdfApi | getDjVu2PDF | GET /v5.0/ocr/DjVu2PDF | GetDjVu2PDF |
DjVu2PdfApi | postDjVu2PDF | POST /v5.0/ocr/DjVu2PDF | PostDjVu2PDF |
IdentifyFontApi | cancelIdentifyFont | DELETE /v5.0/ocr/IdentifyFont | CancelIdentifyFont |
IdentifyFontApi | getIdentifyFont | GET /v5.0/ocr/IdentifyFont | GetIdentifyFont |
IdentifyFontApi | postIdentifyFont | POST /v5.0/ocr/IdentifyFont | PostIdentifyFont |
ImageProcessingApi | getResultFile | GET /v5.0/ocr/ImageProcessing/GetResultFile | GetResultFile |
ImageProcessingApi | getResultTask | GET /v5.0/ocr/ImageProcessing/GetResultTask | GetResultTask |
ImageProcessingApi | postBinarizationFile | POST /v5.0/ocr/ImageProcessing/PostBinarizationFile | PostBinarizationFile |
ImageProcessingApi | postDewarpingFile | POST /v5.0/ocr/ImageProcessing/PostDewarpingFile | PostDewarpingFile |
ImageProcessingApi | postSkewCorrectionFile | POST /v5.0/ocr/ImageProcessing/PostSkewCorrectionFile | PostSkewCorrectionFile |
ImageProcessingApi | postUpsamplingFile | POST /v5.0/ocr/ImageProcessing/PostUpsamplingImageFile | PostUpsamplingImageFile |
RecognizeAndParseInvoiceApi | cancelRecognizeAndParseInvoice | DELETE /v5.0/ocr/RecognizeAndParseInvoice | CancelRecognizeAndParseInvoice |
RecognizeAndParseInvoiceApi | getRecognizeAndParseInvoice | GET /v5.0/ocr/RecognizeAndParseInvoice | GetRecognizeAndParseInvoice |
RecognizeAndParseInvoiceApi | postRecognizeAndParseInvoice | POST /v5.0/ocr/RecognizeAndParseInvoice | PostRecognizeAndParseInvoice |
RecognizeImageApi | cancelRecognizeImage | DELETE /v5.0/ocr/RecognizeImage | CancelRecognizeImage |
RecognizeImageApi | getRecognizeImage | GET /v5.0/ocr/RecognizeImage | GetRecognizeImage |
RecognizeImageApi | postRecognizeImage | POST /v5.0/ocr/RecognizeImage | PostRecognizeImage |
RecognizeImageTrialApi | cancelRecognizeImageTrial | DELETE /v5.0/ocr/RecognizeImageTrial | CancelRecognizeImageTrial |
RecognizeImageTrialApi | getRecognizeImageTrial | GET /v5.0/ocr/RecognizeImageTrial | GetRecognizeImageTrial |
RecognizeImageTrialApi | postRecognizeImageTrial | POST /v5.0/ocr/RecognizeImageTrial | PostRecognizeImageTrial |
RecognizeLabelApi | cancelRecognizeLabel | DELETE /v5.0/ocr/RecognizeLabel | CancelRecognizeLabel |
RecognizeLabelApi | getRecognizeLabel | GET /v5.0/ocr/RecognizeLabel | GetRecognizeLabel |
RecognizeLabelApi | postRecognizeLabel | POST /v5.0/ocr/RecognizeLabel | PostRecognizeLabel |
RecognizePdfApi | cancelRecognizePdf | DELETE /v5.0/ocr/RecognizePdf | CancelRecognizePdf |
RecognizePdfApi | getRecognizePdf | GET /v5.0/ocr/RecognizePdf | GetRecognizePdf |
RecognizePdfApi | postRecognizePdf | POST /v5.0/ocr/RecognizePdf | PostRecognizePdf |
RecognizeReceiptApi | cancelRecognizeReceipt | DELETE /v5.0/ocr/RecognizeReceipt | CancelRecognizeReceipt |
RecognizeReceiptApi | getRecognizeReceipt | GET /v5.0/ocr/RecognizeReceipt | GetRecognizeReceipt |
RecognizeReceiptApi | postRecognizeReceipt | POST /v5.0/ocr/RecognizeReceipt | PostRecognizeReceipt |
RecognizeRegionsApi | cancelRecognizeRegions | DELETE /v5.0/ocr/RecognizeRegions | CancelRecognizeRegions |
RecognizeRegionsApi | getRecognizeRegions | GET /v5.0/ocr/RecognizeRegions | GetRecognizeRegions |
RecognizeRegionsApi | postRecognizeRegions | POST /v5.0/ocr/RecognizeRegions | PostRecognizeRegions |
RecognizeTableApi | cancelRecognizeTable | DELETE /v5.0/ocr/RecognizeTable | CancelRecognizeTable |
RecognizeTableApi | getRecognizeTable | GET /v5.0/ocr/RecognizeTable | GetRecognizeTable |
RecognizeTableApi | postRecognizeTable | POST /v5.0/ocr/RecognizeTable | PostRecognizeTable |
TextToSpeechApi | getTextToSpeechResult | GET /v5.0/ocr/TextToSpeech/GetTextToSpeechResult | GetTextToSpeechResult |
TextToSpeechApi | getTextToSpeechResultFile | GET /v5.0/ocr/TextToSpeech/GetTextToSpeechResultFile | GetTextToSpeechResultFile |
TextToSpeechApi | postTextToSpeech | POST /v5.0/ocr/TextToSpeech/PostTextToSpeech | PostTextToSpeech |
UpscaleImageApi | cancelUpscaleImage | DELETE /v5.0/ocr/UpscaleImage | CancelUpscaleImage |
UpscaleImageApi | getUpscaleImage | GET /v5.0/ocr/UpscaleImage | GetUpscaleImage |
UpscaleImageApi | postUpscaleImage | POST /v5.0/ocr/UpscaleImage | PostUpscaleImage |
UtilitiesApi | getTaskStatus | GET /v5.0/ocr/Utilities/GetTaskStatus | GetTaskStatus |
- DsrConfidence
- DsrMode
- Language
- LanguageTTS
- OCRBinarizeImageBody
- OCRDeskewImageBody
- OCRDetectRegionsBody
- OCRDewarpImageBody
- OCRDjVu2PDFBody
- OCRError
- OCRRecognizeAndParseInvoiceBody
- OCRRecognizeFontBody
- OCRRecognizeImageBody
- OCRRecognizeLabelBody
- OCRRecognizePdfBody
- OCRRecognizeReceiptBody
- OCRRecognizeRegionsBody
- OCRRecognizeTableBody
- OCRRect
- OCRRegion
- OCRResponse
- OCRResult
- OCRSettingsDetectRegions
- OCRSettingsDjVu2PDF
- OCRSettingsRecognizeAndParseInvoice
- OCRSettingsRecognizeFont
- OCRSettingsRecognizeImage
- OCRSettingsRecognizeLabel
- OCRSettingsRecognizePdf
- OCRSettingsRecognizeReceipt
- OCRSettingsRecognizeRegions
- OCRSettingsRecognizeTable
- OCRTaskStatus
- OCRUpscaleImageBody
- PostUpsamplingFileRequest
- ProblemDetails
- ResponseStatusCode
- ResultType
- ResultTypeTTS
- ResultTypeTable
- TTSBody
- TTSBodyDeprecated
- TTSError
- TTSResponse
- TTSResult
- TTSSettings
- TTSTaskStatus
Authentication schemes defined for the API:
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: N/A
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.