
## AsposeOcr class

Main API for Aspose OCR library

The AsposeOcr type exposes the following members:
## Constructors
| Name | Description |
| :- | :- |
|AsposeOcr()|Initializes a new instance of the [AsposeOcr](/ocr/python-net/aspose.ocr/asposeocr/) class.<br/>            Empty constructor.|
## Properties
| Name | Description |
| :- | :- |
|set_debug_mode|Enables debug mode.<br/>            When enabled, the system saves intermediate image processing results<br/>            such as preprocessed images and images with drawn text-line rectangles.|
|set_debug_mode_save_directory|Directory where debug results will be saved.<br/>            If not set, the current working directory will be used by default.|
## Methods
| Name | Description |
| :- | :- |
|recognize(images)|Recognizes text on images / documents.<br/>            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.<br/>            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.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|recognize_lines(images, settings)|Recognizes images that contain single line of text.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|detect_rectangles(images)|Detects text areas on images.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|detect_rectangles(images, areas_type, detect_areas)|Detects text areas on images.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|recognize_characters(images)|Detects symbols on images.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|recognize_characters(images, detect_areas_mode, language)|Detects symbols on images.<br/>            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)|  Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).")|
|save_multipage_document(full_file_name, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path, optimize_pdf)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(full_file_name, save_format, results, optimize_pdf)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(full_file_name, save_format, results)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results, optimize_pdf)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results, embedded_font_path)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results, embedded_font_path, optimize_pdf)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|save_multipage_document(stream, save_format, results, apply_spelling_correction, language, dictionary_path, embedded_font_path, optimize_pdf)| Obsolete("Use OcrOutput.save instead. This API will be removed in version 27.3.0 (March 2027).") |
|recognize_fast(images)|Recognizes text on images / documents.<br/>            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.<br/>            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.<br/>            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, allow_auto_download, model_path)|Analyzes the image using AI and identifies its document type.<br/>            Supports PNG, JPEG, BMP, TIFF, JFIF, and GIF images from files, streams, and pixel arrays.<br/>            Can bulk process folders and archives.|
|recognize_formula(images, detect_areas)|Recognizes mathematical formulas from the provided input images.|
|recognize_formula_ai(images, allow_auto_download, model_path)|Recognizes mathematical formulas from the provided input images using AI.|
|recognize_tables(images, language)|Detect tables and structure, recognizes text cells.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, directory, arrays, archives.|
|detect_tables(images)|Detects table regions on images.<br/>            Supports GIF, PNG, JPEG, BMP, TIFF, JFIF, stream, folder, arrays, archives.|
|calculate_skew(images)|Calculates the skew angles of an images.<br/>            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.<br/>            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.<br/>            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).|
|free_resources()|Clear resources for recognition.|

### See Also

* namespace [aspose.ocr](/ocr/python-net/aspose.ocr/)
* assembly [Aspose.ocr](/ocr/python-net/)

