Browse our Products

Aspose.OCR for C++ 23.12.0 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OCRCPP‑543Added a specialized function for detecting image defects.New feature

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been introduced in this release:

asposeocr_detect_defects() function

Finds potentially problematic areas of an image. This function only returns the information about defects without recognizing the image.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Usage examples

The examples below illustrates the changes introduced in this release:

Detect low contrast areas and glares on a smartphone photo

// Provide the image
string f = current_dir + "photo.jpg";
AsposeOCRInput input;
input.url = f.c_str();
std::vector<AsposeOCRInput> inputs{ input };
// Detect low contrast areas and glares caused by an automatic flash
auto result = asposeocr_detect_defects(inputs.data(), inputs.size(), defect_type::ASPOSE_OCR_DARK_IMAGES | defect_type::ASPOSE_OCR_GLARE);
size_t out_buffer_size = 0;
auto serilization = asposeocr_serialize_result(result, out_buffer_size, export_format::json);
// Show problematic areas
std::cout << std::wstring(serialization) << std::endl;
asposeocr_free_result(result);
delete[] buffer;