Invoice recognition settings
Contents
[
Hide
]
Aspose.OCR for .NET allows for very flexible customization of invoice recognition accuracy, performance, and other settings by configuring the properties of the InvoiceRecognitionSettings
object.
These settings are specifically tailored for processing scanned or photographed invoices.
Setting | Type | Default value | Description |
---|---|---|---|
AllowedCharacters |
Aspose.OCR.CharactersAllowedType | Aspose.OCR.CharactersAllowedType.ALL |
The predefined whitelist of characters Aspose.OCR engine will look for. |
AutoSkew |
boolean | true |
Automatically correct image tilt (deskew) before proceeding to recognition. |
IgnoredCharacters |
string | none | A blacklist of characters that are ignored during recognition. |
Language |
Aspose.OCR.Language | Aspose.OCR.Language.None |
Specify a language for recognition. |
PreprocessingFilters |
Aspose.OCR.Models.PreprocessingFilters.PreprocessingFilter | none | Apply image processing filters that enhance an image before it is sent to the OCR engine. |
ThreadsCount |
integer | auto | The number of CPU threads used for recognition. |
Applicable to
Example
The following code example shows how to fine-tune invoice recognition:
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
Aspose.OCR.InvoiceRecognitionSettings InvoiceRecognitionSettings = new Aspose.OCR.InvoiceRecognitionSettings();
recognitionSettings.Language = Aspose.OCR.Language.Ukr;
recognitionSettings.AutoSkew = false;
Aspose.OCR.RecognitionResult result = recognitionEngine.RecognizeInvoice("invoice.png", recognitionSettings);
Console.WriteLine(result.RecognitionText);