Aspose.OCR for Java 22.7 - Release Notes
This article contains a summary of recent changes, enhancements and bug fixes in Aspose.OCR for Java 22.7 (July 2022) release.
GPU version: 21.6.0
What was changed
Key | Summary | Category |
---|---|---|
OCRJAVA-258 | Added image noise reduction filter. | New feature |
OCRJAVA-258 | Added image skew correction filter. | New feature |
Public API changes and backwards compatibility
This section lists all public API changes introduced in Aspose.OCR for .NET 22.7 that may affect the code of existing applications.
Added public APIs:
The following public APIs have been introduced in this release:
PreprocessingFilter.AutoDenoising()
A new preprocessing filter that automatically removes dirt, spots, scratches, glare, unwanted gradients, and other noise from recognized images.
PreprocessingFilter.AutoSkew()
A new preprocessing filter that automatically straightens skewed images. This can greatly improve the recognition accuracy of smartphone photos and inaccurately scanned pages.
Updated public APIs:
No changes.
Removed public APIs:
No changes.
Usage examples
The examples below illustrates the changes introduced in this release:
Clean up a noisy image
// Create instance of OCR API
AsposeOCR api = new AsposeOCR();
// Add denoise preprocessing filter
PreprocessingFilter filters = new PreprocessingFilter();
filters.add(PreprocessingFilter.AutoDenoising());
// Preprocess an image
BufferedImage imageRes = api.PreprocessImage("image.jpg", filters);
// Save cleaned image into a file
File outputSource = new File("result.png");
ImageIO.write(imageRes, "png", outputSource);
Straighten skewed image
// Create instance of OCR API
AsposeOCR api = new AsposeOCR();
// Add deskew preprocessing filter
PreprocessingFilter filters = new PreprocessingFilter();
filters.add(PreprocessingFilter.AutoSkew());
// Preprocess an image
BufferedImage imageRes = api.PreprocessImage("image.jpg", filters);
// Save straightened image into a file
File outputSource = new File("result.png");
ImageIO.write(imageRes, "png", outputSource);