Aspose.OCR for Python via .NET 23.10.1 - Release Notes
What was changed
Key | Summary | Category |
---|---|---|
OCRPY‑43 | Added a specialized recognition model for extracting content from street photos and other images with sparse text and noisy/colored backgrounds. | New feature |
n/a | Improved matching of the text overlay to the original (background) image in searchable PDF documents. | Enhancement |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OCR for Python via .NET 23.10.1 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been introduced in this release:
recognize_street_photo()
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:
- You must install aspose-ocr-models-textinwild-python-net package in order to use this method.
- 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:
- You must install aspose-ocr-models-textinwild-python-net package in order to use this areas detection algorithm.
- 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
# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Recognize the image
results = api.recognize_street_photo(input)
# Print recognition result
print(results[0].recognition_text)
Find words on a traffic sign
# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Set document areas detection mode
recognitionSettings = RecognitionSettings()
recognitionSettings.detect_areas_mode = DetectAreasMode.TEXT_IN_WILD
# Recognize the image
results = api.recognize(input, recognitionSettings)
# Print recognition result
print(results[0].recognition_text)