com.aspose.ocr

Class PreprocessedImages



  • public class PreprocessedImages
    extends Object

    Containes several modifications of source image, that were obtained during different preprocessing steps


     
     OcrEngine ocr = new OcrEngine();
     ocr.setImage(ImageStream.fromFile("image.tiff"));
     ocr.getConfig().setSavePreprocessedImages(true);
     if (ocr.process())
     {
          BufferedImage im = ocr.getPreprocessedImages().getBinarizedImage();
     }
     

    • Constructor Detail

      • PreprocessedImages

        public PreprocessedImages()

        Default constructor

    • Method Detail

      • getBinarizedImage

        public BufferedImage getBinarizedImage()

        Source image after binarization or background correction

      • getNonTextRemovedImage

        public BufferedImage getNonTextRemovedImage()

        Source image after detecting and removing pictures and other nontext fragments

      • getRotatedImage

        public BufferedImage getRotatedImage()

        Source image after skew correction

      • getTextBlocksImage

        public BufferedImage getTextBlocksImage()

        This image displays detected text blocks with red rectangles

      • setBinarizedImage

        public void setBinarizedImage(com.aspose.ms.System.Drawing.Bitmap value)
      • setBinarizedImage

        public void setBinarizedImage(BufferedImage value)

        Set OCRConfig.setSavePreprocessedImages property to true to get image.

      • setFilteredImage

        public void setFilteredImage(com.aspose.ms.System.Drawing.Bitmap value)

        Source image after applying specified CorrectionFilters

      • setNonTextRemovedImage

        public void setNonTextRemovedImage(com.aspose.ms.System.Drawing.Bitmap value)

        Source image after detecting and removing pictures and other nontext fragments

      • setNonTextRemovedImage

        public void setNonTextRemovedImage(BufferedImage value)

        Source image after detecting and removing pictures and other nontext fragments

      • setRotatedImage

        public void setRotatedImage(com.aspose.ms.System.Drawing.Bitmap value)

        Source image after skew correction

      • setRotatedImage

        public void setRotatedImage(BufferedImage value)

        Source image after skew correction

      • setTextBlocksImage

        public void setTextBlocksImage(com.aspose.ms.System.Drawing.Bitmap value)

        This image displays detected text blocks with red rectangles

      • setTextBlocksImage

        public void setTextBlocksImage(BufferedImage value)

        This image displays detected text blocks with red rectangles