We are pleased to announce that Aspose.OCR for Java 3.3.0 is now available for public use. This release includes image skew correction using algorithm.
Image Skew Correction Using Algorithm
Aspose.OCR for Java provides facility to perform image skew correction using algorithm. Following is the code demonstration of how an OMR scanned sheet image can be deskew/straighten using SkewCorrectionAlgorithm class.
// Load image com.aspose.omr.OmrImage image = com.aspose.omr.OmrImage.load("sample.jpg"); // Area of the image to be processed java.awt.Rectangle area = new java.awt.Rectangle(0, 0, image.getWidth(), image.getHeight()); // Grayscale conversion com.aspose.omr.imageprocessing.GrayscaleAlgorithm gs = new com.aspose.omr.imageprocessing.GrayscaleAlgorithm(); gs.process(image, area); // Binarization com.aspose.omr.imageprocessing.AverageThresholdAlgorithm threshold = new com.aspose.omr.imageprocessing.AverageThresholdAlgorithm(); threshold.process(image, area); // Skew correction com.aspose.omr.imageprocessing.SkewCorrectionAlgorithm skewCorrection = new com.aspose.omr.imageprocessing.SkewCorrectionAlgorithm(); skewCorrection.process(image, area); // save image java.io.File fileObj = new java.io.File("result.jpg"); ImageIO.write(image. asBitmap(), "jpg", fileObj);
Please review the release notes of Aspose.OCR for Java 3.3.0 for a complete view of new features.
Aspose.OCR for Java Resources
The resources, you may need to accomplish your tasks:
- Home page for Aspose.OCR for Java API.
- Download Aspose.OCR for Java.
- Aspose.OCR for Java online documentation – help documentation and API reference documents.
- Aspose.OCR Product Family Forum – post your technical questions and queries, or any other problem you are facing while working with Aspose.OCR APIs.
- Enable blog Subscription – Do not limit yourself, you can keep yourself updated with the latest news on Aspose.OCR APIs, new features, fixes and other API related topics by subscribing to Aspose.OCR blog.
- Aspose.OCR for Java Examples – We have published our code examples on the social coding website GitHub.com. Anyone could explore the code examples for learning purposes.
As always, we appreciate your feedback so if you ever have anything to tell us about this release or anything else, please head to the Aspose.OCR forum for a chat.