aspose::ocr

aspose::ocr namespace

This namespace groups the essential classes and enums that define input images, defect and recognition areas, logging settings, progress monitoring, and detailed recognition results such as pages and text blocks, enabling fine‑grained control over OCR operations in C++ applications.

Classes

NameDescription
AsposeOCRDefectArea
AsposeOCRInput
AsposeOCRLogSettingsStructure for describing a logging settings.
AsposeOCRProgressThis structure contains a current recognition state.
AsposeOCRRecognitionArea
AsposeOCRRecognitionResult
AsposeOCRRecognizedPage
ImageDescriptor
OCR_IMG_AutoskewAutoskew filter Use in C++ -compatible API.
OCR_IMG_BinarizeConverts an image to black-and-white image. Binary images are images whose pixel
OCR_IMG_Contrast_CorrectionContrast correction filter. Use in C++ -compatible API.
OCR_IMG_DenoisingImage denoising filter Use in C++ -compatible API.
OCR_IMG_DilateDilation adds pixels to the boundaries of objects in an image. Use in C++ -compa
OCR_IMG_GrayscaleConverts an image to grayscale image. Grayscale image have 256 level of light in
OCR_IMG_InvertAutomatically inverts colors in a document image. Use in C++ -compatible API.
OCR_IMG_MedianThe median filter run through each element of the image and replace each pixel w
OCR_IMG_ResizeRescale image - Upscale or downscale image resolution. Use in C++ -compatible AP
OCR_IMG_RotateRotate original image. Use in C++ -compatible API.
OCR_IMG_ScaleRescale image - Upscale or downscale image resolution. Use in C++ -compatible AP
OCR_IMG_ThresholdCreate a binary image based on setting a threshold value on the pixel intensity
RecognitionSettingsSettings for the image recognition. Contains elements that allow customizing the
custom_preprocessing_filtersStructure to set 12 preprocessing filters (or less as you need) in some order. U
filter_operationPreprocessing filter type base structure. Use in C++ -compatible API.

Functions

NameDescription
pageOptical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allo
page_from_raw_bytesOptical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allo
page_fast (Deprecated)Optical character recognition image. Doesn’t use automatic text areas detecting and skew correction. Allowed formats is
page_fast_from_raw_bytes (Deprecated)Optical character recognition image. Doesn’t use automatic text areas detecting and skew correction. Allowed formats is
page_settingsOptical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocat
page_settings_from_raw_bytesOptical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocat
page_tiffOptical character recognition image from file with recognition settings Allowed formats is multi-page TIFF, TIF. Buffer
pages_multiBatch text recognition in several images packed in ZIP archive or images from folder Internal archives and folders are n
pages_multi_arrayRecognizes multiple images from vector.
pages_multi_array_from_raw_bytesRecognizes multiple images from vector.
page_from_uriOptical character recognition image from uri with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated
page_saveOptical character recognition image from file with reconition settings. Allowed formats is PNG, JPG, BMP. Buffer allocat
page_allOptical character recognition image without automatic detection of text areas Get all image as text area. Correct skew o
page_all_from_raw_bytesOptical character recognition image without automatic detection of text areas Get all image as text area. Correct skew o
page_rectOptical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the
page_rect_from_raw_bytesOptical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the
page_abcOptical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only
page_abc_from_raw_bytesOptical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only
page_abc_allOptical character recognition image without automatic detection of text areas Get all image as text area. Correct skew o
page_abc_all_from_raw_bytesOptical character recognition image without automatic detection of text areas Get all image as text area. Correct skew o
page_rect_abcOptical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters
page_rect_abc_from_raw_bytesOptical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters
page_characters_choicesA set of characters found by the recognition algorithm and arranged in descending order of probability.
page_characters_choices_from_raw_bytesA set of characters found by the recognition algorithm and arranged in descending order of probability.
preprocess_page_and_saveUse image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input ima
preprocess_page_and_save_from_raw_bytesUse image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input ima
lineOptical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller
line_from_raw_bytesOptical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller
line_abcOptical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowe
line_abc_from_raw_bytesOptical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowe
set_licenseSet license to library. License is XML file.
get_stateCheck license.
get_skewReturns the skew angle in degrees.
get_skew_from_raw_bytesReturns the skew angle in degrees.
get_skew_from_uriReturns the skew angle in degrees. This product includes software developed by the OpenSSL Project for use in the OpenSS
get_rectangles_numberDetects the number of text areas in the image. Automatic image skew correction is not applied.
get_rectangles_number_from_raw_bytesDetects the number of text areas in the image. Automatic image skew correction is not applied.
get_rectangles_number_from_uriDetects the number of text areas in the image. Automatic image skew correction is not applied. This product includes sof
get_rectanglesDetects the text areas in the image. Automatic image skew correction is not applied.
get_rectangles_from_raw_bytesDetects the text areas in the image. Automatic image skew correction is not applied.
get_rectangles_from_uriDetects the text areas in the image. Automatic image skew correction is not applied. This product includes software deve
recognize_receiptRecognizes a special type of image - cash receipts Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If