|
| | __init__ (self) |
| |
| typing.List[SkewOutput] | calculate_skew (self, OcrInput input) |
| | Calculates the skew angles of an images.
|
| |
| bool | compare_image_texts (self, str fullPath1, str fullPath2, RecognitionSettings settings=None, bool ignoreCase=True) |
| | Check if two images contain the same text.
|
| |
| str | correct_spelling (self, str text, SpellCheckLanguage language) |
| | Corrects text (replaces misspelled words).
|
| |
| typing.List[DefectOutput] | detect_defects (self, OcrInput input, aspose.models.DefectType defectType) |
| | Automatically find problematic areas of an image that can significantly impact the accuracy of OCR.
|
| |
| typing.List[RectangleOutput] | detect_rectangles (self, OcrInput input, aspose.models.AreasType areasType, bool isDetectAreas) |
| | Detects text areas on images.
|
| |
| bool | image_has_text (self, str fullPath, str text, RecognitionSettings settings=None, bool ignoreCase=True) |
| | Check if the image contains the provided text fragment.
|
| |
| float | image_text_diff (self, str fullPath1, str fullPath2, RecognitionSettings settings=None, bool ignoreCase=True) |
| | Compare the texts on the two images and return a number representing how similar they are (0 to 1).
|
| |
| OcrOutput | recognize (self, OcrInput input, RecognitionSettings settings=None) |
| | Recognizes image with the ability to specify RecognitionSettings.
|
| |
| OcrOutput | recognize_car_plate (self, aspose.models.OcrInput input, aspose.recognitionsettings.CarPlateRecognitionSettings settings=None) |
| | Recognizes car plate with the ability to specify CarPlateRecognitionSettings.
|
| |
| typing.List[str] | recognize_fast (self, OcrInput input) |
| | Recognizes text on good quality image.
|
| |
| OcrOutput | recognize_id_card (self, aspose.models.OcrInput input, aspose.recognitionsettings.IDCardRecognitionSettings settings=None) |
| | Recognizes ID card with the ability to specify IDCardRecognitionSettings.
|
| |
| OcrOutput | recognize_invoice (self, aspose.models.OcrInput input, aspose.recognitionsettings.InvoiceRecognitionSettings settings=None) |
| | Recognize invoice with the ability to specify InvoiceRecognitionSettings Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
|
| |
| OcrOutput | recognize_lines (self, OcrInput input, RecognitionSettings settings=None) |
| | Recognizes single line image with the ability to specify RecognitionSettings.
|
| |
| OcrOutput | recognize_passport (self, aspose.models.OcrInput input, aspose.recognitionsettings.PassportRecognitionSettings settings=None) |
| | Recognizes passport with the ability to specify PassportRecognitionSettings.
|
| |
| OcrOutput | recognize_receipt (self, aspose.models.OcrInput input, aspose.recognitionsettings.ReceiptRecognitionSettings settings=None) |
| | Recognize receipts with the ability to specify ReceiptRecognitionSettings.
|
| |
| | shutdown (self) |
| | Shut down the JVM machine.
|
| |
AsposeOcr main class for recognition.
This sample shows how to recognize image.
api = AsposeOcr()
input = OcrInput(InputType.SINGLE_IMAGE)
input.add(os.path.join(self.dataDir, "SpanishOCR.bmp"))
result = api.recognize(input)
Calculates the skew angles of an images.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. The container with sources. |
- Returns
- : List of skew angles in degrees - SkewOutput.
| typing.List[DefectOutput] detect_defects |
( |
|
self, |
|
|
OcrInput |
input, |
|
|
aspose.models.DefectType |
defectType |
|
) |
| |
Automatically find problematic areas of an image that can significantly impact the accuracy of OCR.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| defectType | The types of defects to be recognized. |
- Returns
- : List of DefectOutput with detected text areas or lines.
| typing.List[RectangleOutput] detect_rectangles |
( |
|
self, |
|
|
OcrInput |
input, |
|
|
aspose.models.AreasType |
areasType, |
|
|
bool |
isDetectAreas |
|
) |
| |
Detects text areas on images.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| areasType | Determinates wich rectangles to return - line, paragraphs or words. |
| isDetectAreas | Enable automatic text areas detection. |
- Returns
- : List of RectangleOutput with detected text areas or lines.
Recognizes image with the ability to specify RecognitionSettings.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | RecognitionSettings object. |
- Returns
- : RecognitionResult list with images recognition results.
| OcrOutput recognize_car_plate |
( |
|
self, |
|
|
aspose.models.OcrInput |
input, |
|
|
aspose.recognitionsettings.CarPlateRecognitionSettings |
settings = None |
|
) |
| |
Recognizes car plate with the ability to specify CarPlateRecognitionSettings.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | CarPlateRecognitionSettings |
- Returns
- : RecognitionResult list with images recognition results.
| typing.List[str] recognize_fast |
( |
|
self, |
|
|
OcrInput |
input |
|
) |
| |
Recognizes text on good quality image.
Doesn't use automatic image skew correction and text areas detection. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
- Returns
- : RecognitionResult list with images recognition results.
| OcrOutput recognize_id_card |
( |
|
self, |
|
|
aspose.models.OcrInput |
input, |
|
|
aspose.recognitionsettings.IDCardRecognitionSettings |
settings = None |
|
) |
| |
Recognizes ID card with the ability to specify IDCardRecognitionSettings.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | IDCardRecognitionSettings |
- Returns
- : RecognitionResult list with images recognition results.
| OcrOutput recognize_invoice |
( |
|
self, |
|
|
aspose.models.OcrInput |
input, |
|
|
aspose.recognitionsettings.InvoiceRecognitionSettings |
settings = None |
|
) |
| |
Recognize invoice with the ability to specify InvoiceRecognitionSettings Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | InvoiceRecognitionSettings |
- Returns
- : RecognitionResult list with images recognition results.
| OcrOutput recognize_passport |
( |
|
self, |
|
|
aspose.models.OcrInput |
input, |
|
|
aspose.recognitionsettings.PassportRecognitionSettings |
settings = None |
|
) |
| |
Recognizes passport with the ability to specify PassportRecognitionSettings.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | PassportRecognitionSettings |
- Returns
- : RecognitionResult list with images recognition results.
| OcrOutput recognize_receipt |
( |
|
self, |
|
|
aspose.models.OcrInput |
input, |
|
|
aspose.recognitionsettings.ReceiptRecognitionSettings |
settings = None |
|
) |
| |
Recognize receipts with the ability to specify ReceiptRecognitionSettings.
Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, binary array, folder, array, zip archive, URL, base64.
- Parameters
-
| input | :py:any:~aspose.models.OcrInput. instance. |
| settings | ReceiptRecognitionSettings |
- Returns
- : RecognitionResult list with images recognition results.