OCR C++ API

Classes

struct  AsposeOCRProgress
 This structure contains a current recognition state. More...
 

Enumerations

enum  ASPOSE_OCR_IMAGE_PROCESSING_STATE {
  ASPOSE_OCR_START , ASPOSE_OCR_LOADED , ASPOSE_OCR_PREPROCESSED , ASPOSE_OCR_REGIONS_DETECTED ,
  ASPOSE_OCR_TEXT_RECOGNIZED
}
 

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.
 
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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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)
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
DLL_PUBLIC void aspose::ocr::set_license (const char *licenseFullPath)
 Set license to library. License is XML file.
 
DLL_PUBLIC bool aspose::ocr::get_state ()
 Check license.
 
DLL_PUBLIC double aspose::ocr::get_skew (const char *image_path)
 Returns the skew angle in degrees.
 
DLL_PUBLIC double aspose::ocr::get_skew_from_raw_bytes (const ImageDescriptor &descriptor)
 Returns the skew angle in degrees.
 
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)
 
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.
 
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.
 
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)
 
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.
 
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.
 
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)
 
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.
 
DLL_PUBLIC void asposeocr_set_progress_tracker (void(*pt)(const AsposeOCRProgress &progress))
 Set user specified function, that can help to track recognize progress.
 
DLL_PUBLIC void asposeocr_set_log_settings (const AsposeOCRLogSettings &log_settings)
 Set log settings 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.
 
DLL_PUBLIC int asposeocr_get_allowed_thread_number ()
 A function for getting information about the number of threads that will be involved in recognition.
 
DLL_PUBLIC void asposeocr_set_allowed_thread_number (int amount)
 Function for setting the number of threads that will participate in recognition.
 
DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize (AsposeOCRInput *descriptors, size_t descriptors_amount, const RecognitionSettings &settings)
 Optical character recognition image with automatic detection of text areas Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system 2) ZIP archive or images from folder in file system Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder 3) Images PNG, JPG, BMP from URI.
 
DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_detect_defects (AsposeOCRInput *descriptors, size_t descriptors_amount, unsigned int defects=defect_type::ASPOSE_OCR_DETECT_ALL)
 
DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_fast_recognize (AsposeOCRInput *descriptors, size_t descriptors_amount)
 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.
 
DLL_PUBLIC wchar_t * asposeocr_serialize_result (const AsposeOCRRecognitionResult &recognition_result, size_t &output_buffer_size, const export_format &format=export_format::text)
 Prepare a recognition result in awailable output formats Allowed formats: text, json, xml.
 
DLL_PUBLIC void asposeocr_free_result (AsposeOCRRecognitionResult &result)
 Releases the memory allocated by the asposeocr_recognize method.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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)
 
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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
DEPRECATED 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
DLL_PUBLIC void asposeocr_set_license (const char *licenseFullPath)
 Set license to library. License is XML file.
 
DLL_PUBLIC bool asposeocr_get_state ()
 Check license.
 
DLL_PUBLIC double asposeocr_get_skew (const char *image_path)
 Returns the skew angle in degrees.
 
DLL_PUBLIC double asposeocr_get_skew_from_raw_bytes (const ImageDescriptor &descriptor)
 Returns the skew angle in degrees.
 
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)
 
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.
 
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.
 
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)
 
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.
 
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.
 
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)
 
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.
 
DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize_vehicle_license_plate (const AsposeOCRInput *input, size_t input_amount, const RecognitionSettings &settings)
 Recognizes a special type of image - car number. Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system. 2) ZIP archive or images from folder in file system. Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder. 3) Images PNG, JPG, BMP from URI.
 
DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize_passport (const AsposeOCRInput *input_array, size_t input_size, const RecognitionSettings &settings)
 Recognizes a special type of image - passports. Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system. 2) ZIP archive or images from folder in file system. Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder. 3) Images PNG, JPG, BMP from URI.
 

Detailed Description

Enumeration Type Documentation

◆ ASPOSE_OCR_IMAGE_PROCESSING_STATE

Enumerator
ASPOSE_OCR_START 
ASPOSE_OCR_LOADED 
ASPOSE_OCR_PREPROCESSED 
ASPOSE_OCR_REGIONS_DETECTED 
ASPOSE_OCR_TEXT_RECOGNIZED 

Function Documentation

◆ asposeocr_detect_defects()

DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_detect_defects ( AsposeOCRInput descriptors,
size_t  descriptors_amount,
unsigned int  defects = defect_type::ASPOSE_OCR_DETECT_ALL 
)

◆ asposeocr_fast_recognize()

DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_fast_recognize ( AsposeOCRInput descriptors,
size_t  descriptors_amount 
)

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_amountSize of allocated descriptors.

///

Returns
Result of recognition as a complex structure AsposeOCRRecognitionResult, that described in definition

◆ asposeocr_free_result()

DLL_PUBLIC void asposeocr_free_result ( AsposeOCRRecognitionResult result)

Releases the memory allocated by the asposeocr_recognize method.

Parameters
recognition_resultRecognition result as a AsposeOCRRecognitionResult structure created by asposeocr_recognize method

◆ asposeocr_get_allowed_thread_number()

DLL_PUBLIC int asposeocr_get_allowed_thread_number ( )

A function for getting information about the number of threads that will be involved in recognition.

◆ 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DEPRECATED 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()

DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize ( AsposeOCRInput descriptors,
size_t  descriptors_amount,
const RecognitionSettings settings 
)

Optical character recognition image with automatic detection of text areas Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system 2) ZIP archive or images from folder in file system Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder 3) Images PNG, JPG, BMP from URI.

Parameters
descriptorsImage descriptors array.
descriptors_amountSize of allocated descriptors.
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
Result of recognition as a complex structure AsposeOCRRecognitionResult, that described in definition

◆ asposeocr_recognize_passport()

DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize_passport ( const AsposeOCRInput input_array,
size_t  input_size,
const RecognitionSettings settings 
)

Recognizes a special type of image - passports. Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system. 2) ZIP archive or images from folder in file system. Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder. 3) Images PNG, JPG, BMP from URI.

Parameters
inputImage descriptors array.
input_amountBuffer allocated by the caller.
settingsparameters for recognition Awailable settings fields:
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
  • settings filters - preprocess filters (defult all members is nullptr)
Returns
Result of recognition as a complex structure AsposeOCRRecognitionResult, that described in definition.

◆ 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_recognize_vehicle_license_plate()

DLL_PUBLIC AsposeOCRRecognitionResult asposeocr_recognize_vehicle_license_plate ( const AsposeOCRInput input,
size_t  input_amount,
const RecognitionSettings settings 
)

Recognizes a special type of image - car number. Allowed formats: 1) Images PNG, JPG, BMP, TIFF from file system. 2) ZIP archive or images from folder in file system. Internal archives and folders are not supported Only PNG, JPG, BMP, TIFF internal images are used for recognition from ZIP archive or from folder. 3) Images PNG, JPG, BMP from URI.

Parameters
inputImage descriptors array.
input_amountBuffer allocated by the caller.
settingsparameters for recognition Awailable settings fields:
  • setting automatic skew correction of the text - correct_skew(default true)
  • setting customer skew correction of the text - skew(default 0)
  • setting characters from the alphabet to recognition - alphabet(default nullptr)
  • setting language - language_alphabet (default language::none)
  • settings filters - preprocess filters (defult all members is nullptr)
Returns
Result of recognition as a complex structure AsposeOCRRecognitionResult, that described in definition.

◆ asposeocr_serialize_result()

DLL_PUBLIC wchar_t * asposeocr_serialize_result ( const AsposeOCRRecognitionResult recognition_result,
size_t &  output_buffer_size,
const export_format &  format = export_format::text 
)

Prepare a recognition result in awailable output formats Allowed formats: text, json, xml.

Parameters
recognition_resultRecognition result as a AsposeOCRRecognitionResult structure.
output_buffer_sizeSize of allocated buffer. Filled by called method.
formatOutput format descriptor
Returns
Alloceted in HEAP wchar_t array with size in output_buffer_size field.

◆ asposeocr_set_allowed_thread_number()

DLL_PUBLIC void asposeocr_set_allowed_thread_number ( int  amount)

Function for setting the number of threads that will participate in recognition.

Parameters
amountNumber of threads to set.

◆ 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

◆ asposeocr_set_log_settings()

DLL_PUBLIC void asposeocr_set_log_settings ( const AsposeOCRLogSettings log_settings)

Set log settings 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
log_settingsLog settings structure.

◆ asposeocr_set_progress_tracker()

DLL_PUBLIC void asposeocr_set_progress_tracker ( void(*)(const AsposeOCRProgress &progress)  pt)

Set user specified function, that can help to track recognize progress.

Parameters
ptPointer to user specified function.

◆ 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()

DEPRECATED 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()

DEPRECATED 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