AsposeOcr

AsposeOcr class

Main API for Aspose OCR library

The AsposeOcr type exposes the following members:

Constructors

NameDescription
AsposeOcr()Initializes a new instance of the AsposeOcr class.
Empty constructor.

Properties

NameDescription
set_debug_modeEnables debug mode.
When enabled, the system saves intermediate image processing results
such as preprocessed images and images with drawn text-line rectangles.
set_debug_mode_save_directoryDirectory where debug results will be saved.
If not set, the current working directory will be used by default.

Methods

NameDescription
recognize(images)Recognizes text on images / documents.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, directory, arrays, archives.
recognize(images, preset)Recognizes text from the given OCR input using a predefined preset configuration.
recognize(images, settings)Recognizes text on images / documents.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, directory, arrays, archives.
recognize_receipt(images)Recognizes text on receipts.
recognize_receipt(images, settings)Recognizes text on receipts.
recognize_invoice(images)Recognizes text on invoices.
recognize_invoice(images, settings)Recognizes text on invoices.
recognize_id_card(images)Recognizes text on ID card.
recognize_id_card(images, settings)Recognizes text on ID card.
recognize_car_plate(images)Recognizes text on car plate.
recognize_car_plate(images, settings)Recognizes text on car plate.
recognize_passport(images)Recognizes text on passport.
recognize_passport(images, settings)Recognizes text on passport.
recognize_lines(images)Recognizes images that contain single line of text.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
recognize_lines(images, settings)Recognizes images that contain single line of text.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
detect_rectangles(images)Detects text areas on images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
detect_rectangles(images, areas_type, detect_areas)Detects text areas on images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
recognize_characters(images)Detects symbols on images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
recognize_characters(images, detect_areas_mode, language)Detects symbols on images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
save_multipage_document(full_file_name, save_format, results, embedded_font_path, optimize_pdf)
save_multipage_document(full_file_name, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path, optimize_pdf)
save_multipage_document(full_file_name, save_format, results, optimize_pdf)
save_multipage_document(full_file_name, save_format, results)
save_multipage_document(stream, save_format, results)
save_multipage_document(stream, save_format, results, optimize_pdf)
save_multipage_document(stream, save_format, results, embedded_font_path)
save_multipage_document(stream, save_format, results, embedded_font_path, optimize_pdf)
save_multipage_document(stream, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path)
save_multipage_document(stream, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path, optimize_pdf)
recognize_fast(images)Recognizes text on images / documents.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, directory, arrays, archives.
recognize_handwritten_text(images)Recognizes handwritten text on images.
detect_document_layout(images)Analyzes the image and identifies the different types of content areas within it.
Supports PNG, JPEG, BMP, TIFF, JFIF, and GIF images from files, streams, and pixel arrays. Can bulk process folders and archives.
detect_document_type(images)Analyzes the image and identifies it’s type.
Supports PNG, JPEG, BMP, TIFF, JFIF, and GIF images from files, streams, and pixel arrays. Can bulk process folders and archives.
detect_document_type_ai(images)Analyzes the image using AI and identifies its document type.
Supports PNG, JPEG, BMP, TIFF, JFIF, and GIF images from files, streams, and pixel arrays.
Can bulk process folders and archives.
recognize_formula(images, detect_areas)Recognizes mathematical formulas from the provided input images.
recognize_formula_ai(images)Recognizes mathematical formulas from the provided input images using AI.
recognize_tables(images, language)Detect tables and structure, recognizes text cells.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, directory, arrays, archives.
detect_tables(images)Detects table regions on images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
calculate_skew(images)Calculates the skew angles of an images.
Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.
detect_defects(images, defect_type)Automatically find problematic areas of an image that can significantly impact the accuracy of OCR.
Supports PNG, JPEG, BMP, TIFF, JFIF, and GIF images provided as a file, stream, or pixel array. Supports bulk recognition.
detect_languages(images)Analyzes the text on the image to determine the languages it is written in.
This allows to select the most suitable recognition language and helps in further text processing tasks such as spellchecking or translation.
image_has_text(full_path, text, settings, ignore_case, auto_skew)Check if the image contains the provided text fragment.
compare_image_texts(full_path1, full_path2, settings, ignore_case)Check if two images contain the same text.
image_text_diff(full_path1, full_path2, settings, ignore_case, auto_skew)Compare the texts on the two images and return a number representing how similar they are (0 to 1).
correct_spelling(text, language, dictionary_path)Corrects text (replaces misspelled words).

See Also