Browse our Products
Aspose.OCR for .NET 23.7.1 - Release Notes
This article contains a summary of recent changes, enhancements and bug fixes in Aspose.OCR for .NET 23.7.1 (July 2023) release.
GPU version: 23.5.0
Deprecation warning
The release 23.3.1 introduced a slimmer, faster and more straightforward API. All of your existing code will continue to work and you can even make minor updates to it, but be aware that all deprecated elements are scheduled to be removed in release 23.11.0 (November 2023) in favor of the new API.
Time to deprecation: 3 months left.
What was changed
Key | Summary | Category |
---|---|---|
OCRNET‑708 | Added new recognition settings for automatic handling of white text on a dark/black background. See Added public APIs for important details. | New feature |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OCR for .NET 23.7.1 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been introduced in Aspose.OCR for .NET 23.7.1 release:
Aspose.OCR.RecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background.
This setting is applicable when using one of the following document area detection modes:
Aspose.OCR.ReceiptRecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background in scanned or photographed receipts.
Aspose.OCR.IDCardRecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background in scanned or photographed ID cards.
Aspose.OCR.PassportRecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background in scanned or photographed passports.
Aspose.OCR.CarPlateRecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background in photographed vehicle license plates.
Aspose.OCR.InvoiceRecognitionSettings.AutomaticColorInversion
When set to true
, Aspose.OCR for .NET uses a special OCR algorithm for automatic detection and accurate recognition of of white text on a dark/black background in scanned or photographed invoices.
Updated public APIs:
No changes
Removed public APIs:
No changes.
Examples
The examples below illustrates the changes introduced in this release:
Automatic handling of inverted texts
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add an image to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source.png");
// Apply inverted text detection
Aspose.OCR.RecognitionSettings recognitionSettings = new Aspose.OCR.RecognitionSettings();
recognitionSettings.AutomaticColorInversion = true;
recognitionSettings.DetectAreasMode = Aspose.OCR.DetectAreasMode.TABLE;
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input, recognitionSettings);
Console.WriteLine(result[0].RecognitionText);