OCR C++ API

Functions

DLL_PUBLIC size_t aspose::ocr::page (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_fast (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_fast_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_settings (const char *image_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_settings_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_tiff (const char *image_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with recognition settings Allowed formats is multi-page TIFF, TIF. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::pages_multi (const char *path_to_recognize, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Batch text recognition in several images packed in ZIP archive or images from folder Internal archives and folders are not supported Only PNG, JPG, BMP internal images are used for recognition from ZIP archive or from folder More...
 
DLL_PUBLIC size_t aspose::ocr::pages_multi_array (const char **files, size_t files_number, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Recognizes multiple images from vector. More...
 
DLL_PUBLIC size_t aspose::ocr::pages_multi_array_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Recognizes multiple images from vector. More...
 
DLL_PUBLIC size_t aspose::ocr::page_from_uri (const char *uri, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from uri with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC void aspose::ocr::page_save (const char *image_path, const char *save_path, RecognitionSettings settings)
 Optical character recognition image from file with reconition settings. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. Saves the document in a plain text, PDF or Microsoft Word Document. More...
 
DLL_PUBLIC size_t aspose::ocr::page_all (const char *image_path, wchar_t *buffer, size_t buffer_size, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_all_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_abc_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_abc_all (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_abc_all_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Skew alignment does not occur. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect_abc_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Skew alignment does not occur. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_characters_choices (const char *image_path, wchar_t buffer[][6], size_t buffer_size, RecognitionSettings settings)
 A set of characters found by the recognition algorithm and arranged in descending order of probability. More...
 
DLL_PUBLIC size_t aspose::ocr::page_characters_choices_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t buffer[][6], size_t buffer_size, RecognitionSettings settings)
 A set of characters found by the recognition algorithm and arranged in descending order of probability. More...
 
DLL_PUBLIC void aspose::ocr::preprocess_page_and_save (const char *image_path, const char *save_image_path, filter_operation *filters, size_t filters_number)
 Use image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input image in the order you specify. example to create filters: filter_operation f[4]; f[0] = (OCR_IMG_Resize(1000, 1000)); f[1] = (OCR_IMG_Scale(0.3)); f[2] = (OCR_IMG_Invert()); f[3] = (OCR_IMG_Binarize()); You don't need all of them. Set only what you need. More...
 
DLL_PUBLIC void aspose::ocr::preprocess_page_and_save_from_raw_bytes (const ImageDescriptor &descriptor, const char *save_image_path, filter_operation *filters, size_t filters_number)
 Use image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input image in the order you specify. example to create filters: filter_operation f[4]; f[0] = (OCR_IMG_Resize(1000, 1000)); f[1] = (OCR_IMG_Scale(0.3)); f[2] = (OCR_IMG_Invert()); f[3] = (OCR_IMG_Binarize()); You don't need all of them. Set only what you need. More...
 
DLL_PUBLIC size_t aspose::ocr::line (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t aspose::ocr::line_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t aspose::ocr::line_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t aspose::ocr::line_abc_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC void aspose::ocr::set_license (const char *licenseFullPath)
 Set license to library. License is XML file. More...
 
DLL_PUBLIC bool aspose::ocr::get_state ()
 Check license. More...
 
DLL_PUBLIC double aspose::ocr::get_skew (const char *image_path)
 Returns the skew angle in degrees. More...
 
DLL_PUBLIC double aspose::ocr::get_skew_from_raw_bytes (const ImageDescriptor &descriptor)
 Returns the skew angle in degrees. More...
 
DLL_PUBLIC double aspose::ocr::get_skew_from_uri (const char *uri)
 Returns the skew angle in degrees. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles_number (const char *image_path, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles_number_from_raw_bytes (const ImageDescriptor &descriptor, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles_number_from_uri (const char *uri, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles (const char *image_path, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles_from_raw_bytes (const ImageDescriptor &descriptor, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t aspose::ocr::get_rectangles_from_uri (const char *uri, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t aspose::ocr::recognize_receipt (const char *filePath, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Recognizes a special type of image - cash receipts Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_fast (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_fast_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_settings (const char *image_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_settings_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_tiff (const char *image_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from file with recognition settings Allowed formats is multi-page TIFF, TIF. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_pages_multi (const char *folder_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Batch text recognition in several images packed in ZIP archive or images from folder Internal archives and folders are not supported Only PNG, JPG, BMP internal images are used for recognition from ZIP archive or from folder More...
 
DLL_PUBLIC size_t asposeocr_page_from_uri (const char *uri, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Optical character recognition image from uri Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC void asposeocr_page_save (const char *image_path, const char *save_path, RecognitionSettings settings)
 Optical character recognition image from file with reconition settings. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. Saves the document in a plain text, PDF or Microsoft Word Document. More...
 
DLL_PUBLIC size_t asposeocr_page_all (const char *image_path, wchar_t *buffer, size_t buffer_size, bool correct_skew)
 Optical character recognition image without automatic detection of text areas. Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_all_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, bool correct_skew)
 Optical character recognition image without automatic detection of text areas. Get all image as text area. Correct skew of the text according to parameter. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image in the defined rectangle. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_abc_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_abc_all (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_abc_all_from_raw_bytes (ImageDescriptor *descriptors, size_t descriptors_size, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet, bool correct_skew)
 Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Skew alignment does not occur. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect_abc_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image in the defined rectangle. Skew alignment does not occur. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_characters_choices (const char *image_path, wchar_t buffer[][6], size_t buffer_size, RecognitionSettings settings)
 A set of characters found by the recognition algorithm and arranged in descending order of probability. More...
 
DLL_PUBLIC size_t asposeocr_page_characters_choices_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t buffer[][6], size_t buffer_size, RecognitionSettings settings)
 A set of characters found by the recognition algorithm and arranged in descending order of probability. More...
 
DLL_PUBLIC void asposeocr_preprocess_page_and_save (const char *image_path, const char *save_image_path, custom_preprocessing_filters filters)
 Use image preprocessing to improve the accuracy of OCR. Create a vector of filters that will be applied to the input image in the order you specify. example to create filters: custom_preprocessing_filters filters; filters.filter_3 = OCR_IMG_PREPROCESS_INVERT; filters.filter_4 = OCR_IMG_PREPROCESS_THRESHOLD(20); filters.filter_3 = OCR_IMG_PREPROCESS_BINARIZE; filters.filter_1 = OCR_IMG_PREPROCESS_RESIZE(1000, 1000); filters.filter_2 = OCR_IMG_PREPROCESS_SCALE(0.3); filters.filter_6 = OCR_IMG_PREPROCESS_DILATE; filters.filter_7 = OCR_IMG_PREPROCESS_ROTATE(-20); filters.filter_8 = OCR_IMG_PREPROCESS_GRAYSCALE; You don't need all of them. Set only what you need. More...
 
DLL_PUBLIC size_t asposeocr_line (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t asposeocr_line_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t asposeocr_line_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t asposeocr_line_abc_from_raw_bytes (const ImageDescriptor &descriptor, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC void asposeocr_set_license (const char *licenseFullPath)
 Set license to library. License is XML file. More...
 
DLL_PUBLIC bool asposeocr_get_state ()
 Check license. More...
 
DLL_PUBLIC double asposeocr_get_skew (const char *image_path)
 Returns the skew angle in degrees. More...
 
DLL_PUBLIC double asposeocr_get_skew_from_raw_bytes (const ImageDescriptor &descriptor)
 Returns the skew angle in degrees. More...
 
DLL_PUBLIC double asposeocr_get_skew_from_uri (const char *uri)
 Returns the skew angle in degrees. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles_number (const char *image_path, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles_number_from_raw_bytes (const ImageDescriptor &descriptor, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles_number_from_uri (const char *uri, areas_type type, bool all_image)
 Detects the number of text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles (const char *image_path, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles_from_raw_bytes (const ImageDescriptor &descriptor, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. More...
 
DLL_PUBLIC size_t asposeocr_get_rectangles_from_uri (const char *uri, areas_type type, bool all_image, rect *buffer, size_t buffer_size)
 Detects the text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux) More...
 
DLL_PUBLIC size_t asposeocr_recognize_receipt (const char *image_path, wchar_t *buffer, size_t buffer_size, RecognitionSettings settings)
 Recognizes a special type of image - cash receipts Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 

Detailed Description

Function Documentation

◆ asposeocr_get_rectangles()

DLL_PUBLIC size_t asposeocr_get_rectangles ( const char *  image_path,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied.

Parameters
image_pathFull path to image.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_rectangles_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_get_rectangles_from_raw_bytes ( const ImageDescriptor descriptor,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied.

Parameters
descriptorImage descriptor.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_rectangles_from_uri()

DLL_PUBLIC size_t asposeocr_get_rectangles_from_uri ( const char *  uri,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures. The size should be taken from asposeocr_get_rectangles_amount method.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_rectangles_number()

DLL_PUBLIC size_t asposeocr_get_rectangles_number ( const char *  image_path,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied.

Parameters
image_pathFull path to image.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_rectangles_number_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_get_rectangles_number_from_raw_bytes ( const ImageDescriptor descriptor,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied.

Parameters
descriptorImage descriptor.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_rectangles_number_from_uri()

DLL_PUBLIC size_t asposeocr_get_rectangles_number_from_uri ( const char *  uri,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles_from_uri method, that is the number of rectangles found in the image (lines or paragraphs).

◆ asposeocr_get_skew()

DLL_PUBLIC double asposeocr_get_skew ( const char *  image_path)

Returns the skew angle in degrees.

Parameters
image_pathFull path to image.
Returns
Angle in degrees.

◆ asposeocr_get_skew_from_raw_bytes()

DLL_PUBLIC double asposeocr_get_skew_from_raw_bytes ( const ImageDescriptor descriptor)

Returns the skew angle in degrees.

Parameters
descriptorImage descriptor.
Returns
Angle in degrees.

◆ asposeocr_get_skew_from_uri()

DLL_PUBLIC double asposeocr_get_skew_from_uri ( const char *  uri)

Returns the skew angle in degrees. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
Returns
Angle in degrees.

◆ asposeocr_get_state()

DLL_PUBLIC bool asposeocr_get_state ( )

Check license.

Returns
True if the license is installed and valid, otherwise false.

◆ asposeocr_line()

DLL_PUBLIC size_t asposeocr_line ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_line_abc()

DLL_PUBLIC size_t asposeocr_line_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_line_abc_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_line_abc_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_line_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_line_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page()

DLL_PUBLIC size_t asposeocr_page ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_abc()

DLL_PUBLIC size_t asposeocr_page_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_abc_all()

DLL_PUBLIC size_t asposeocr_page_abc_all ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_abc_all_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_abc_all_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_abc_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_abc_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_all()

DLL_PUBLIC size_t asposeocr_page_all ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas. Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_all_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_all_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas. Get all image as text area. Correct skew of the text according to parameter. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_characters_choices()

DLL_PUBLIC size_t asposeocr_page_characters_choices ( const char *  image_path,
wchar_t  buffer[][6],
size_t  buffer_size,
RecognitionSettings  settings 
)

A set of characters found by the recognition algorithm and arranged in descending order of probability.

The array of symbols char with the maximum probability and alternatives.

Parameters
image_pathFull path to the image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition.

◆ asposeocr_page_characters_choices_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_characters_choices_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t  buffer[][6],
size_t  buffer_size,
RecognitionSettings  settings 
)

A set of characters found by the recognition algorithm and arranged in descending order of probability.

The array of symbols char with the maximum probability and alternatives.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition.

◆ asposeocr_page_fast()

DLL_PUBLIC size_t asposeocr_page_fast ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_fast_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_fast_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_from_uri()

DLL_PUBLIC size_t asposeocr_page_from_uri ( const char *  uri,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from uri Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::none), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated).
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_rect()

DLL_PUBLIC size_t asposeocr_page_rect ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_rect_abc()

DLL_PUBLIC size_t asposeocr_page_rect_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Skew alignment does not occur. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_rect_abc_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_rect_abc_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image in the defined rectangle. Skew alignment does not occur. Only allowed characters from the alphabet are recognized. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_rect_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_rect_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image in the defined rectangle. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_page_save()

DLL_PUBLIC void asposeocr_page_save ( const char *  image_path,
const char *  save_path,
RecognitionSettings  settings 
)

Optical character recognition image from file with reconition settings. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. Saves the document in a plain text, PDF or Microsoft Word Document.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
save_pathFilename with a path for saving recognition result in the selected format.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::none), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated), allows to set format for file - save_format (default file_format:: txt).

◆ asposeocr_page_settings()

DLL_PUBLIC size_t asposeocr_page_settings ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::none), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated).
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t).

◆ asposeocr_page_settings_from_raw_bytes()

DLL_PUBLIC size_t asposeocr_page_settings_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::none), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated).
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t).

◆ asposeocr_page_tiff()

DLL_PUBLIC size_t asposeocr_page_tiff ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with recognition settings Allowed formats is multi-page TIFF, TIF. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple TIFF (TIF) images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_pages_multi()

DLL_PUBLIC size_t asposeocr_pages_multi ( const char *  folder_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Batch text recognition in several images packed in ZIP archive or images from folder Internal archives and folders are not supported Only PNG, JPG, BMP internal images are used for recognition from ZIP archive or from folder

Parameters
folder_pathfull path to the zip archive (with .zip name) or to the folder with images
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::all), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated).
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ asposeocr_preprocess_page_and_save()

DLL_PUBLIC void asposeocr_preprocess_page_and_save ( const char *  image_path,
const char *  save_image_path,
custom_preprocessing_filters  filters 
)

Use image preprocessing to improve the accuracy of OCR. Create a vector of filters that will be applied to the input image in the order you specify. example to create filters: custom_preprocessing_filters filters; filters.filter_3 = OCR_IMG_PREPROCESS_INVERT; filters.filter_4 = OCR_IMG_PREPROCESS_THRESHOLD(20); filters.filter_3 = OCR_IMG_PREPROCESS_BINARIZE; filters.filter_1 = OCR_IMG_PREPROCESS_RESIZE(1000, 1000); filters.filter_2 = OCR_IMG_PREPROCESS_SCALE(0.3); filters.filter_6 = OCR_IMG_PREPROCESS_DILATE; filters.filter_7 = OCR_IMG_PREPROCESS_ROTATE(-20); filters.filter_8 = OCR_IMG_PREPROCESS_GRAYSCALE; You don't need all of them. Set only what you need.

Parameters
image_pathFull path to the image.
save_image_pathFull path to the output filtered image.
filtersImage optimization filterscustom_preprocessing_filters.

◆ asposeocr_recognize_receipt()

DLL_PUBLIC size_t asposeocr_recognize_receipt ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Recognizes a special type of image - cash receipts Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
  • setting detect_areas_mode ignored
  • setting all_image ignored
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t).

◆ asposeocr_set_license()

DLL_PUBLIC void asposeocr_set_license ( const char *  licenseFullPath)

Set license to library. License is XML file.

Parameters
licenseFullPathFull path to license file.
Returns
void

◆ get_rectangles()

DLL_PUBLIC size_t aspose::ocr::get_rectangles ( const char *  image_path,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied.

Parameters
image_pathFull path to image.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_rectangles_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::get_rectangles_from_raw_bytes ( const ImageDescriptor descriptor,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied.

Parameters
descriptorImage descriptor.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_rectangles_from_uri()

DLL_PUBLIC size_t aspose::ocr::get_rectangles_from_uri ( const char *  uri,
areas_type  type,
bool  all_image,
rect buffer,
size_t  buffer_size 
)

Detects the text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
typeDeterminates wich rectangles to get - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
bufferBuffer allocated by the caller. The size should be taken from asposeocr_get_rectangles_amount method.
buffer_sizeSize of the buffer allocated by the caller as the number of rect structures. The size should be taken from asposeocr_get_rectangles_amount method.
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_rectangles_number()

DLL_PUBLIC size_t aspose::ocr::get_rectangles_number ( const char *  image_path,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied.

Parameters
image_pathFull path to image.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_rectangles_number_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::get_rectangles_number_from_raw_bytes ( const ImageDescriptor descriptor,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied.

Parameters
descriptorImage descriptor.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_rectangles_number_from_uri()

DLL_PUBLIC size_t aspose::ocr::get_rectangles_number_from_uri ( const char *  uri,
areas_type  type,
bool  all_image 
)

Detects the number of text areas in the image. Automatic image skew correction is not applied. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
typeDeterminates wich rectangles to calculate - line or paragraphs.
all_imageDisabled (false) by default. Turning on means recognizing the image as a single area (switch off automatic text paragraphs detection).
Returns
Returns the length of a required buffer size for asposeocr_get_rectangles_from_uri method, that is the number of rectangles found in the image (lines or paragraphs).

◆ get_skew()

DLL_PUBLIC double aspose::ocr::get_skew ( const char *  image_path)

Returns the skew angle in degrees.

Parameters
image_pathFull path to image.
Returns
Angle in degrees.

◆ get_skew_from_raw_bytes()

DLL_PUBLIC double aspose::ocr::get_skew_from_raw_bytes ( const ImageDescriptor descriptor)

Returns the skew angle in degrees.

Parameters
descriptorImage descriptor.
Returns
Angle in degrees.

◆ get_skew_from_uri()

DLL_PUBLIC double aspose::ocr::get_skew_from_uri ( const char *  uri)

Returns the skew angle in degrees. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
Returns
Angle in degrees.

◆ get_state()

DLL_PUBLIC bool aspose::ocr::get_state ( )

Check license.

Returns
True if the license is installed and valid, otherwise false.

◆ line()

DLL_PUBLIC size_t aspose::ocr::line ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ line_abc()

DLL_PUBLIC size_t aspose::ocr::line_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ line_abc_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::line_abc_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ line_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::line_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page()

DLL_PUBLIC size_t aspose::ocr::page ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_abc()

DLL_PUBLIC size_t aspose::ocr::page_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_abc_all()

DLL_PUBLIC size_t aspose::ocr::page_abc_all ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_abc_all_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_abc_all_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Only allowed characters from the alphabet are recognized. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptors array.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_abc_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_abc_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Only allowed characters from the alphabet are recognized. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_all()

DLL_PUBLIC size_t aspose::ocr::page_all ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_all_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_all_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
bool  correct_skew 
)

Optical character recognition image without automatic detection of text areas Get all image as text area. Correct skew of the text according to parameter. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsAn array of ImageDescriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
correct_skewRemove skew image.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_characters_choices()

DLL_PUBLIC size_t aspose::ocr::page_characters_choices ( const char *  image_path,
wchar_t  buffer[][6],
size_t  buffer_size,
RecognitionSettings  settings 
)

A set of characters found by the recognition algorithm and arranged in descending order of probability.

The array of symbols char with the maximum probability and alternatives.

Parameters
image_pathFull path to the image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition.

◆ page_characters_choices_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_characters_choices_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t  buffer[][6],
size_t  buffer_size,
RecognitionSettings  settings 
)

A set of characters found by the recognition algorithm and arranged in descending order of probability.

The array of symbols char with the maximum probability and alternatives.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition.

◆ page_fast()

DLL_PUBLIC size_t aspose::ocr::page_fast ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_fast_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_fast_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Doesn't use automatic text areas detecting and skew correction. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsAn array of ImageDescriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with automatic detection of text areas and detecting, correct skew of the text. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsAn array of ImageDescriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or requisred buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_from_uri()

DLL_PUBLIC size_t aspose::ocr::page_from_uri ( const char *  uri,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from uri with reconition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). (Linux)

Parameters
uriFull uri to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_rect()

DLL_PUBLIC size_t aspose::ocr::page_rect ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_rect_abc()

DLL_PUBLIC size_t aspose::ocr::page_rect_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Skew alignment does not occur. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_rect_abc_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_rect_abc_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Only allowed characters from the alphabet are recognized. Skew alignment does not occur. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_rect_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_rect_from_raw_bytes ( const ImageDescriptor descriptor,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image in the defined rectangle. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. Skew alignment does not occur. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorImage descriptor.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_save()

DLL_PUBLIC void aspose::ocr::page_save ( const char *  image_path,
const char *  save_path,
RecognitionSettings  settings 
)

Optical character recognition image from file with reconition settings. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. Saves the document in a plain text, PDF or Microsoft Word Document.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
save_pathFilename with a path for saving recognition result in the selected format.
settingsparameters for recognition: allows to set automatic detection of text areas - all_image(default false), allows to set automatic skew correction of the text - correct_skew(default true), allows to set customer skew correction of the text - skew(default 0), allows to set rectangles in pixels for recognize - rectangles array, allows to set characters from the alphabet to recognition - alphabet(default nullptr), allows to set language - language_alphabet (default language::none), allows to set threshold value for image binarization - threshold_value (default is 0, automatically calculated), allows to set format for file - save_format (default file_format:: txt).

◆ page_settings()

DLL_PUBLIC size_t aspose::ocr::page_settings ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_settings_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::page_settings_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with recognition settings Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
descriptorsAn array of ImageDescriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_tiff()

DLL_PUBLIC size_t aspose::ocr::page_tiff ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Optical character recognition image from file with recognition settings Allowed formats is multi-page TIFF, TIF. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple TIFF (TIF) images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ pages_multi()

DLL_PUBLIC size_t aspose::ocr::pages_multi ( const char *  path_to_recognize,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Batch text recognition in several images packed in ZIP archive or images from folder Internal archives and folders are not supported Only PNG, JPG, BMP internal images are used for recognition from ZIP archive or from folder

Parameters
path_to_recognizefull path to the zip archive (with .zip name) or to the folder with images
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition Allows to set automatic detection of text areas - all_image(default false) Allows to set automatic skew correction of the text - correct_skew(default true) Allows to set customer skew correction of the text - skew(default 0) Allows to set rectangles in pixels for recognize - rectangles array Allows to set characters from the alphabet to recognition - alphabet(default nullptr) Allows to set language - language_alphabet (default language::all)
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ pages_multi_array()

DLL_PUBLIC size_t aspose::ocr::pages_multi_array ( const char **  files,
size_t  files_number,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Recognizes multiple images from vector.

Archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP.

Parameters
filesThe pointer on the two-dimensional array with full paths to the images.
files_numberThe number of files for recognition.The size of the first dimension of the files array.
bufferBuffer allocated by the caller to save result from all images recognition.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsRecognition settings.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ pages_multi_array_from_raw_bytes()

DLL_PUBLIC size_t aspose::ocr::pages_multi_array_from_raw_bytes ( ImageDescriptor descriptors,
size_t  descriptors_size,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Recognizes multiple images from vector.

Archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP.

Parameters
descriptorsAn array of ImageDescriptor.
descriptors_sizeSize of allocated descriptors.
bufferBuffer allocated by the caller to save result from all images recognition.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsRecognition settings.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ preprocess_page_and_save()

DLL_PUBLIC void aspose::ocr::preprocess_page_and_save ( const char *  image_path,
const char *  save_image_path,
filter_operation filters,
size_t  filters_number 
)

Use image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input image in the order you specify. example to create filters: filter_operation f[4]; f[0] = (OCR_IMG_Resize(1000, 1000)); f[1] = (OCR_IMG_Scale(0.3)); f[2] = (OCR_IMG_Invert()); f[3] = (OCR_IMG_Binarize()); You don't need all of them. Set only what you need.

Parameters
image_pathFull path to the image.
save_image_pathFull path to the output filtered image.
filtersImage optimization filtersfilter_operation.Pointer on the array.
filters_numberNumber of the filters in the array.

◆ preprocess_page_and_save_from_raw_bytes()

DLL_PUBLIC void aspose::ocr::preprocess_page_and_save_from_raw_bytes ( const ImageDescriptor descriptor,
const char *  save_image_path,
filter_operation filters,
size_t  filters_number 
)

Use image preprocessing to improve the accuracy of OCR. Create an array of filters that will be applied to the input image in the order you specify. example to create filters: filter_operation f[4]; f[0] = (OCR_IMG_Resize(1000, 1000)); f[1] = (OCR_IMG_Scale(0.3)); f[2] = (OCR_IMG_Invert()); f[3] = (OCR_IMG_Binarize()); You don't need all of them. Set only what you need.

Parameters
descriptorImage descriptor.
save_image_pathFull path to the output filtered image.
filtersImage optimization filtersfilter_operation.Pointer on the array.
filters_numberNumber of the filters in the array.

◆ recognize_receipt()

DLL_PUBLIC size_t aspose::ocr::recognize_receipt ( const char *  filePath,
wchar_t *  buffer,
size_t  buffer_size,
RecognitionSettings  settings 
)

Recognizes a special type of image - cash receipts Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathThe full path to the image or the paths for multiple images separated by a semicolon.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
settingsparameters for recognition
  • setting automatic detection of text areas - all_image(default false)
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting rectangles in pixels for recognize - rectangles array
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
  • setting detect_areas_mode ignored
  • setting all_image ignored
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. Allowed results in text or json format. In bytes it 'RETURN_VALUE' * sizeof(wchar_t).

◆ set_license()

DLL_PUBLIC void aspose::ocr::set_license ( const char *  licenseFullPath)

Set license to library. License is XML file.

Parameters
licenseFullPathFull path to license file.
Returns
void