Preparing content for recognition
Aspose.OCR for C++ provides a standardized way to prepare your content for OCR. The image, document, folder, or URL is provided as an AsposeOCRInput
structure. Multiple AsposeOCRInput
structures are encapsulated into std::vector
sequence container allowing you to easily process a single image or a large number of images (for example, pages from an auto-feed scanner) with a single API call.
Supported content types
Depending on the content type, you should set different AsposeOCRInput
structure members:
Content type | Required structure members |
---|---|
File (of any supported format) |
|
Directory |
|
URL |
|
Raw image data |
|
Recognition settings |
|
You must choose whether to provide content as a path/URL or as raw pixel data. For other elements of the structure, you must leave the default values.
Providing both content types in the same structure will result in an error. However, you can put multiple AsposeOCRInput
structures are into std::vector
sequence.
Examples
The following code samples demonstrates how to prepare content for recognition: