Tracking recognition progress

Aspose.OCR for C++ allows you to implement an event listener and report recognition progress using asposeocr_set_progress_tracker() function.

For each page or file, the following information is reported:

Property Description
images_amount The total number of source images to be recognized.
current_image_number The ordinal number of the image.
current_state The stage of the recognition progress.

Recognition progress stages

Stage Description
ASPOSE_OCR_START Recognition started.
ASPOSE_OCR_LOADED The image was sent for recognition.
ASPOSE_OCR_PREPROCESSED The image was processed through preprocessing filters.
ASPOSE_OCR_REGIONS_DETECTED The image is split into content blocks.
ASPOSE_OCR_TEXT_RECOGNIZED Recognition finished.

Example

void progress_tracker(const AsposeOCRProgress& input)
{
	std::cout << "Number of images: " << input.images_amount
		<< " current image: " << input.current_image_number
		<< " current state: " << input.current_state << std::endl;
}

<...>

asposeocr_set_progress_tracker(&progress_tracker);