com.aspose.ocr.filters

Class MedianFilter



  • public class MedianFilter
    extends Filter

    Represents median filtration.


     
     OcrEngine ocrEngine = new OcrEngine();
     // Add median blur filtration.
     ocrEngine.getConfig().getCorrectionFilters().add(new MedianFilter());
     

    • Constructor Summary

      Constructors 
      Constructor and Description
      MedianFilter()
      Initializes a new instance of the MedianFilter class.
      MedianFilter(int size)
      Initializes a new instance of the MedianFilterOld class.
    • Constructor Detail

      • MedianFilter

        public MedianFilter()

        Initializes a new instance of the MedianFilter class.

      • MedianFilter

        public MedianFilter(int size)

        Initializes a new instance of the MedianFilterOld class.

        Parameters:
        size - Window size.
    • Method Detail

      • correct

        public com.aspose.enhence.ocr.sharedlibrary.bitmap.GrayBitmap correct(com.aspose.enhence.ocr.sharedlibrary.bitmap.GrayBitmap bitmap)

        Applies correction to image

        Specified by:
        correct in class Filter
        Parameters:
        bitmap - input image
        Returns:
        corrected image
      • getSize

        public int getSize()

        Gets Size of a filter.

      • setSize

        public void setSize(int value)

        Sets Size of a filter.