Browse our Products

Aspose.OCR for .NET 23.12.1 - Release Notes

What was changed

KeySummaryCategory
OCRNET‑769Added recognition of handwritten text and introduced Aspose.OCR.Models.Handwritten recognition model.New feature
OCRNET‑770Implemented the retrieval of essential data from passports issued in Madagascar.New feature

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for .NET 23.12.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.12.1 release:

RecognizeHandwrittenText() method

A specialized recognition method for extracting handwritten text from images. It supports a number of European languages based on Extended Lain alphabet.

RecognizeHandwrittenText() method has some limitations:

  • The method only supports a limited subset of Extended Latin letters and numbers.
  • Both uppercase and lowercase letters are recognized. However, the resulting text will be in uppercase.
  • This method does not support recognition settings. The recognition language is detected automatically.

GetKeywords() method

Extracts essential information from a passport image, like date of birth, names, and more. The specific details extracted depend on the passport’s origin, which is specified in the Country parameter of the passport recognition settings. The information is returned as a dictionary with key-value pairs that are specific to each country.

This method only applies to passport recognition results. Calling it on results obtained from any other recognition method will return an empty dictionary.

Updated public APIs:

The following public APIs have been changed in Aspose.OCR for .NET 23.12.1 release:

RecognizePassport() method

To use this method, install the Text-in-wild recognition model in your project. If this model is not present, an exception will be thrown.

Removed public APIs:

No changes

Examples

The code samples below illustrate the changes introduced in this release:

Extract key details from Malagasy passport

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add scanned passport to recognition batch
OcrInput passports = new OcrInput(InputType.SingleImage);
passports.Add("malagasy_passport_sample.png");
// Explicitly specify that you are processing Malagasy passport
var recognitionSettings = new PassportRecognitionSettings();
recognitionSettings.Country = Aspose.OCR.Country.MADAGASCAR;
// Recognize passport
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.RecognizePassport(passports, recognitionSettings);
// Parse passport data and output essential details along with image regions they were found in
var details = results[0].GetKeywords();
foreach (var item in details)
{
	Console.WriteLine($"{item.Key}: {item.Value.TextInLine}");
	Console.WriteLine($"Left: {item.Value.Line.X}; top: {item.Value.Line.Y}; size: {item.Value.Line.Width} x {item.Value.Line.Height}");
}

Recognize handwritten memos

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add images to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("memo1.png");
input.Add("memo2.png");
// Recognize images
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.RecognizeHandwrittenText(input);
foreach(Aspose.OCR.RecognitionResult result in results)
{
	Console.WriteLine(result.RecognitionText);
}