Browse our Products
Aspose.OCR for Java 3.6.0 Release Notes
Key | Summary | Category |
---|---|---|
OCRNET-1152 | The angle of rotation is calculated inproperly | Enhancement |
OCRNET-1250 | Improve neighbor-based skew corrector quality on small images and small angles | Enhancement |
OCRNET-1277 | Support faster image rotation algorithm | Enhancement |
OCRNET-1108 | Incorrect textblock calculation for deskewed image | Enhancement |
Usage examples:
*Method com.aspose.omr.OmrEngine.rotateImage(com.aspose.omr.OmrImage, double) added instead of method com.aspose.omr.OmrEngine.rotateImage(com.aspose.omr.OmrImage,int)
OmrImage image = OmrImage.load("sample.jpg");
OmrEngine engine = new OmrEngine(new OmrTemplate());
double degree = engine.getSkewDegree(image);
image = engine.rotateImage(image, degree);
BufferedImage actualImage = image.asBitmap();
OCRNET-1108 Incorrect textblock calculation for deskewed image
String pictureFileName = "VodafoneBillImage1.jpg";
OcrEngine ocrEngine = new OcrEngine();
ocrEngine.getConfig().clearRecognitionBlocks();
ocrEngine.setImage(ImageStream.fromFile(pictureFileName));
ocrEngine.getConfig().setDetectTextRegions(false);
ocrEngine.getConfig().addRecognitionBlock(RecognitionBlock.createTextBlock(122, 570, 373, 36));
ocrEngine.getConfig().setSavePreprocessedImages(true);
if (ocrEngine.process())
{
PreprocessedImages preprocessedImages = ocrEngine.getPreprocessedImages();
BufferedImage bufferedImage = preprocessedImages.getTextBlocksImage();
try
{
ImageIO.write(bufferedImage, "png", new File("block.png"));
}
catch (IOException e)
{
e.printStackTrace();
}
}