Browse our Products

Aspose.OCR for Python via C++ 24.7.0 - Release Notes

What was changed

KeySummaryCategory
OCRCPP‑597Advanced OCR features are now selectively downloaded as needed.New feature
OCRCPP‑608Published Aspose.OCR for Python via C++ to PyPI.New feature

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Python via C++ 24.7.0 that may affect the code of existing applications.

Added public APIs:

The major change introduced in Aspose.OCR for Python via C++ 24.7.0 is that the distributive now offers basic recognition capabilities only. Additional features can be added via downloadable resources, freely available in our online repository.

This approach allows you to selectively choose which features you need for your project, keeping your codebase lean and modular.

asposeocr.LoadSettings() object

Allows you to configure resource loading settings:

PropertyTypeDescription
resources_root_pathstringAbsolute or relative path to the directory in which the downloadable OCR resources are located. If automatic resource loading is enabled, the files will be downloaded to this directory.
Do not forget to move a directory with downloaded resources along with the application, otherwise the related functionality will fail.
lazy_loadboolAutomatically load the required resources when calling the method dependent on them. Requires Internet connection at the runtime.
Disabled by default.

asposeocr.set_load_settings()

Apply the resource loading settings configured in asposeocr.LoadSettings() object.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Examples

The code samples below illustrate the changes introduced in this release:

Ukrainian text recognition

import asposeocr
# Use resources from extra/resources directory under project directory
load_settings = asposeocr.LoadSettings()
load_settings.root_load_path = "extra/resources"
asposeocr.set_load_settings(load_settings)
# Set recognition language
settings = asposeocr.RecognitionSettings()
settings.language_alphabet = language.ukr
# Provide the image  for recognition
input_data = [asposeocr.AsposeOCRInput()]
input_data[0].url = 'image.png'
# Extract text from the image
result = asposeocr.AsposeOCRRecognizeVehicleLicensePlate(input_data, settings)

Automatically download resources

import asposeocr
# Automatically download resources to extra/resources directory under project directory
load_settings = asposeocr.LoadSettings()
load_settings.root_load_path = "extra/resources"
load_settings.lazy_load = true
asposeocr.set_load_settings(load_settings)
# Set recognition language
settings = asposeocr.RecognitionSettings()
settings.language_alphabet = language.ukr
# Provide the image  for recognition
input_data = [asposeocr.AsposeOCRInput()]
input_data[0].url = 'image.png'
# Extract text from the image
result = asposeocr.AsposeOCRRecognizeVehicleLicensePlate(input_data, settings)