Browse our Products

Aspose.OCR for C++ 24.2.0 - Release Notes

What was changed

KeySummaryCategory
OCRCPP‑572Added the ability to customize recognition settings for individual images in a batch.Enhancement

Public API changes and backwards compatibility

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

Added public APIs:

No changes.

Updated public APIs:

The following public APIs have been changed in Aspose.OCR for .NET 24.2.0 release:

AsposeOCRInput structure

Added an optional property, special_settings which contains a pointer to RecognitionSettings structure. If the pointer is not NULL, the content-specific recognition settings are used instead of the recognition settings provided in the asposeocr_recognize() function.

Removed public APIs:

No changes.

Usage examples

The examples below illustrates the changes introduced in this release:

Overriding recognition language for the specific image

// Define custom recognition settings
RecognitionSettings customSettings;
customSettings.language_alphabet = language::ukr;

// Add images to the batch
string image1 = "source1.png";
AsposeOCRInput source1;
source1.url = image1.c_str();
string image2 = "source2.png";
AsposeOCRInput source2;
source2.url = image2.c_str();
source2.special_settings = &customSettings;
std::vector<AsposeOCRInput> sources = { source1, source2 };

// Define common recognition settings
RecognitionSettings settings;
settings.language_alphabet = language::ita;

// Extract text from the image
auto result = asposeocr_recognize(sources.data(), sources.size(), settings);