Browse our Products

Aspose.OCR for Java 24.6.0 - Release Notes

Deprecation warning

What was changed

KeySummaryCategory
OCRJAVA‑374
OCRJAVA‑377
Automatic detection of problematic areas of an image that can significantly impact the accuracy of OCR.New feature
OCRJAVA‑380Significantly improved recognition of languages based on the Latin alphabet.Enhancement

Public API changes and backwards compatibility

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

Added public APIs:

The following public APIs have been added to Aspose.OCR for Java 24.6.0 release:

DetectDefects() method

Automatically find potentially problematic areas of image and return the information on the type of defect and its coordinates.

DefectType enumeration

Image defects that can be detected automatically:

DefectValueDescription
Salt-and-pepper noiseDefectType.SALT_PEPPER_NOISEAppears as random white and black pixels scattered across the area. Often occurs in digital photographs.
Low contrast between text and backgroundDefectType.LOW_CONTRASTHighlights and shadows typically appear on curved pages.
BlurDefectType.BLURThe entire image or some of its areas are out of focus.
Important: This detection algorithm can only identify the entire image as blurry. Specific areas cannot be detected.
GlareDefectType.GLAREHighlight areas in an image caused by uneven lighting, such as spot lights or flash.
All supported defectsDefectType.ALLAll above-mentioned defects.

DefectAreas class

Image areas containing a certain type of defect.

PropertyTypeDescription
defectTypeDefectTypeDefect type.
rectanglesRectangle[]Image areas where the defect was found.

DefectOutput class

Image areas containing a certain type of defect.

PropertyTypeDescription
SourcestringThe full path to the file or URL, if any. Empty for streams, byte arrays, and Base64 encoded files.
PageintThe page number for multi-page images and PDFs.
defectAreasArrayList<DefectAreas>The list of image defects and areas where they were found.

Updated public APIs:

No changes.

Removed public APIs:

No changes.

Changes to application logic

We have significantly improved an OCR model for all languages based on Latin alphabet:

  • English
  • Indonesian
  • Italian
  • Malay (Melayu)
  • Hausa
  • Swahili
  • Yoruba
  • Oromo
  • Dutch
  • Malagasy
  • Zhuang
  • Somali
  • Chichewa (Chewa, Nyanja)
  • Rwanda
  • Min Bei
  • Zulu
  • Min Dong
  • Hiligaynon
  • Hmong
  • Shona (Karanga)
  • Xhosa
  • Betawi
  • Afrikaans
  • Minangkabau
  • Sotho (Southern)
  • Bikol
  • Kanuri
  • Tswana
  • Luo
  • Sukuma
  • Tsonga
  • Bemba (Chibemba)
  • Nandi
  • Palembang
  • Umbundu
  • Sotho (Northern)
  • Waray-Waray
  • Lamani (Lambadi)
  • Musi
  • Pu-Xian
  • Kapampangan
  • Bouyei (Buyi, Giáy)
  • Ndebele
  • Sasak
  • Swati (Swazi)
  • Gusii
  • Meru
  • Wolaytta
  • Dong
  • Pangasinan
  • Makassar (Makasar)
  • Tumbuka
  • Serer-Sine
  • LaTonga
  • Luguru
  • Latin

Examples

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

Detect shadows and highlights

// Initialize Aspose.OCR recognition API
AsposeOCR api = new AsposeOCR();
// Add image to the recognition batch
OcrInput source = new OcrInput(InputType.SingleImage);
source.add("image.png");
// Find shadows and highlights
ArrayList<DefectOutput> defects =  api.DetectDefects(input, DefectType.LOW_CONTRAST);
for(DefectOutput d : result) {
	for (DefectAreas ar : d.defectAreas) {
		System.out.println(ar.defectType);
		for (Rectangle r : ar.rectangles) {
			System.out.println(r.x + " " + r.y + " " + r.width + " " + r.height);
		}
	}
}