Class ContrastStretching


  • public class ContrastStretching
    extends java.lang.Object
    Contrast Stretching is pretty similar to Histogram Equalization, but rather that computing pixel intensity probability & corresponding CDF values, we'll go for stretching pixel intensity range, which may be intially `a` & `b`, where a > 0 && or || b < 255, but we'll make it 0 to 255. Finally dark image will get brighter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage transform​(java.awt.image.BufferedImage img)
      For each pixel intensity value of a grayscale image, we'll apply afore defined transformation function & put transformed pixel intensity value in each cell, which will be returned ( that can be either exported or processed further )
      java.awt.image.BufferedImage transform​(java.lang.String src)
      Just another way to invoke previous transformation function, instead of passing BufferedImage, image file name to be passed, which will be read & modified image buffer to be returned ( using previous function )
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContrastStretching

        public ContrastStretching()
    • Method Detail

      • transform

        public java.awt.image.BufferedImage transform​(java.awt.image.BufferedImage img)
        For each pixel intensity value of a grayscale image, we'll apply afore defined transformation function & put transformed pixel intensity value in each cell, which will be returned ( that can be either exported or processed further )

        Concurrency incorporated using java Thread pool.

      • transform

        public java.awt.image.BufferedImage transform​(java.lang.String src)
        Just another way to invoke previous transformation function, instead of passing BufferedImage, image file name to be passed, which will be read & modified image buffer to be returned ( using previous function )