Aspose.OCR for Java 23.10.0 - Release Notes
This article contains a summary of recent changes, enhancements and bug fixes in Aspose.OCR for Java 23.10.0 (October 2023) release.
GPU version: 23.10.0
Deprecation warning
The release 23.3.0 introduced a slimmer, faster and more straightforward API. All of your existing code will continue to work and you can even make minor updates to it, but be aware that all deprecated elements are scheduled to be removed in release 23.11.0 (November 2023) in favor of the new API.
Time to deprecation: 1 months left.
What was changed
Key | Summary | Category |
---|---|---|
OCRJAVA‑337 | Added a specialized recognition model for extracting content from street photos and other images with sparse text and noisy/colored backgrounds. | New feature |
OCRJAVA‑340 | Fixed incorrect line order that sometimes occurred when saving OCR results as multi-page documents. | Fix |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OCR for Java 23.10.0 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been introduced in Aspose.OCR for Java 23.10.0 release:
RecognizeStreetPhoto()
method
Extract content from images with sparse text and noisy/colored backgrounds. This method significantly improves OCR accuracy in the following business cases:
- Read text from street photos.
- Segment and identify road signs and signboards within street images.
- Locate price tags and interpret the extracted text as prices.
- Find and aggregate regions of interest on food labels, such as nutritional information or ingredient lists.
- Identify and analyze car license plates.
- Extract text from menus and catalogs.
Important considerations:
- The method only supports Latin letters and numbers.
- This method does not support recognition settings.
DetectAreasMode.TEXT_IN_WILD
A new areas detection algorithm that finds individual words on images with sparse text, such as street photos, price tags, food labels, menus, ads and the like.
Important considerations:
- This areas detection algorithm only works with Latin letters and numbers.
- It is not recommended to use this algorithm for parsing structured texts. Use
DetectAreasMode.DOCUMENT
,DetectAreasMode.PHOTO
,DetectAreasMode.COMBINE
orDetectAreasMode.TABLE
instead, depending on the content type.
Updated public APIs:
No changes.
Removed public APIs:
No changes.
Examples
The examples below illustrates the changes introduced in this release:
Extracting text from a street photo
AsposeOCR api = new AsposeOCR();
// Load an image
OcrInput input = new OcrInput(InputType.SingleImage);
input.add(os.path.join(self.dataDir, "photo.png"));
// Recognize text
ArrayList<RecognitionResult> results = api.RecognizeStreetPhoto(input);
results.forEach((result) -> {
System.out.println(result.recognition_text);
});
Find words on a traffic sign
AsposeOCR api = new AsposeOCR();
RecognitionSettings recognitionSettings = new RecognitionSettings();
recognitionSettings.setDetectAreasMode(DetectAreasMode.TEXT_IN_WILD);
// Load an image
OcrInput images = new OcrInput(InputType.SingleImage);
images.add("sign.png");
// Recognize images
ArrayList<RecognitionResult> results = api.Recognize(images, recognitionSettings);
System.out.println("Recognition result:\n" + results[0].recognitionText + "\n\n");