Aspose.OCR for C++ 22.11.0 - Release Notes

What was changed

Key Summary Category
OCRCPP-372 Added a new document areas detection mode that auto-straightens curved lines and finds text blocks inside the resulting image. New feature

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been introduced in this release:

detect_areas_mode_enum::CURVED_TEXT

Added a new areas detection mode detect_areas_mode_enum::CURVED_TEXT which uses a specialized neural network that automatically tracks and rectifies curved lines of text. This improves recognition accuracy and allows much more text to be recovered and extracted.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Usage examples

The examples below illustrates the changes introduced in this release:

detect_areas_mode_enum::CURVED_TEXT

const string image = "source.jpg";
// Prepare buffer for result (in symbols, len_byte = len * sizeof(wchar_t))
const size_t len = 4096; 
wchar_t buffer[len] = { 0 };
// Activate curved text corrections
RecognitionSettings settings;
settings.detect_areas_mode = detect_areas_mode_enum::CURVED_TEXT;
// Read image
size_t size = asposeocr_page_settings(image.c_str(), buffer, len, settings);
#ifdef _WIN32
	setmode(_fileno(stdout), 0x00020000);
#else
	setlocale(LC_CTYPE, "");
#endif
	std::wcout << buffer;