detect_areas_mode_enum::DOCUMENT

Contents
[ ]

This algorithm works best with large amounts of structured text such as scanned contracts, book pages, articles, newspapers, and the like. It breaks content into larger blocks, such as paragraphs and columns. These blocks are then analyzed, read and combined into recognition results.

detect_areas_mode_enum::DOCUMENT algorithm

*The example article is Copyright © 2016 CLINICS, distributed under the terms of the Creative Commons license.

However, it may not be suitable for analyzing photographs and small amounts of irregular text - try detect_areas_mode_enum::PHOTO instead.

Example

The following code sample demonstrates how to use this document areas detection algorithm:

// Provide the image
string file = "source.png";
AsposeOCRInput source;
source.url = file.c_str();
std::vector<AsposeOCRInput> content = { source };
// Fine-tune recognition
RecognitionSettings settings;
settings.detect_areas_mode = detect_areas_mode_enum::DOCUMENT;
// Extract text from the image
auto result = asposeocr_recognize(content.data(), content.size(), settings);
// Output the recognized text
wchar_t* buffer = asposeocr_serialize_result(result, buffer_size, export_format::text);
std::wcout << std::wstring(buffer) << std::endl;
// Release the resources
asposeocr_free_result(result);