Class Closing


  • public class Closing
    extends java.lang.Object
    Implementation of image smoothing op - Closing

    - First dilate image

    - Then erode it

    Order of kernels i.e. structuring elements to be used for morphological ops, to be specified while invoking `smooth` method

    • Constructor Summary

      Constructors 
      Constructor Description
      Closing()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage smooth​(java.awt.image.BufferedImage img, int orderDilation, int orderErosion)
      Smooths image using ordered combination morphological op - Dilation & Erosion
      java.awt.image.BufferedImage smooth​(java.lang.String img, int orderDilation, int orderErosion)
      Smooths image using ordered combination morphological op - Dilation & Erosion
      • Methods inherited from class java.lang.Object

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

      • Closing

        public Closing()
    • Method Detail

      • smooth

        public java.awt.image.BufferedImage smooth​(java.awt.image.BufferedImage img,
                                                   int orderDilation,
                                                   int orderErosion)
        Smooths image using ordered combination morphological op - Dilation & Erosion
        Parameters:
        img - Image to be smoothed
        orderDilation - Order of kernel i.e. structuring element to be used for Dilation
        orderErosion - Order of kernel i.e. structuring element to be used for Erosion
        Returns:
        Smoother image with more foreground pixels
      • smooth

        public java.awt.image.BufferedImage smooth​(java.lang.String img,
                                                   int orderDilation,
                                                   int orderErosion)
        Smooths image using ordered combination morphological op - Dilation & Erosion
        Parameters:
        img - Image to be smoothed
        orderDilation - Order of kernel i.e. structuring element to be used for Dilation
        orderErosion - Order of kernel i.e. structuring element to be used for Erosion
        Returns:
        Smoother image with more foreground pixels