Browse our Products

Aspose.OCR for Java 23.4.0 - Release Notes

Deprecation warning

What was changed

OCRJAVA‑318Added support for character-by-character recognition and character bounding box detection.New feature

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Java 23.4.0 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been introduced in this release:

RecognizeCharacters method

This method recognizes one or more files provided as an OcrInput object and returns each recognized character with its coordinates.

CharacterRecognitionResult class

The collection of all characters detected by Aspose.OCR.AsposeOcr.RecognizeCharacters method and their bounding boxes.

Character class

The recognized character and the coordinates of its bounding box.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Usage examples

The examples below illustrates the changes introduced in this release:

Character-by-character recognition

AsposeOCR api = new AsposeOCR();
// Add an image to the recognition batch
OcrInput input  = new OcrInput(InputType.SingleImage, filters);
// Detect and recognize characters
ArrayList<CharacterRecognitionResult> result =  api.RecognizeCharacters(input, DetectAreasMode.DOCUMENT, Language.None);
// Output recognized characters
for(Character c : result[0].Characters)
	System.out.println("Found character \"" + c.Value + "\" by coordinates: left - " + c.Coordinates.X + " | top - " + c.Coordinates.Y + " | width - " + c.Coordinates.Width + " | height - " + c.Coordinates.Height);