Latest release

Deprecation warning

What was changed

OCRCPP‑529Automatic detection of glare regions of an image that may not be accurately recognized.New feature
OCRCPP‑531Automatic detection of characters that are too thick in image text.New feature

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been introduced in this release:

defect_type::ASPOSE_OCR_DETECT_GLARES enumeration

Allows OCR engine to automatically detect highlight areas in an image caused by uneven lighting, such as spot lights or flash. Such areas usually have low contrast, which can negatively affect recognition accuracy or even lead to some texts not being recognized.

defect_type::ASPOSE_OCR_DETECT_EXTRA_BOLD_TEXT enumeration

Allows OCR engine to automatically detect very thick characters on an image. Such characters may be recognized incorrectly.

AsposeOCRDefectType.ASPOSE_OCR_GLARE enumeration

Marks highlight areas in an image detected with defect_type::ASPOSE_OCR_DETECT_GLARES algorithm.

AsposeOCRDefectType.ASPOSE_OCR_EXTRA_BOLD_TEXT enumeration

Marks extra-bold texts in an image detected with defect_type::ASPOSE_OCR_DETECT_EXTRA_BOLD_TEXT algorithm.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Usage examples

The examples below illustrates the changes introduced in this release:

Detecting glares on an image

int main()
	// Provide the image  for recognition
	string file = "source.png";
	AsposeOCRInput source;
	source.url = file.c_str();
	vector<AsposeOCRInput> content = {source};
	// Enable detection of curved areas
	RecognitionSettings settings;
	settings.defect_type = defect_type::ASPOSE_OCR_DETECT_GLARES;
	// Extract text from the image
	AsposeOCRRecognitionResult result = asposeocr_recognize(, content.size(), settings);
	// Show low-contrast areas
	// Release the resources

std::ostream& operator<<(std::ostream& op, const rect& input)
	op << "top: " << input.y << "; left: " << input.x << "; width: " << input.width << "; height:" << input.height;
	return op;

void print(const AsposeOCRRecognitionResult& input)
	for (size_t p_number = 0; p_number < input.pages_amount; ++p_number)
		cout << "Page " << p_number << ";\n";
		const auto& page = input.recognized_pages[p_number];
		for (size_t defect_number = 0; defect_number < page.defects_count; ++defect_number)
			const auto& defect_area = page.defect_areas[defect_number];
			cout << "Highlight areas " << defect_number << ":" << defect_area.area << std::endl;