Class EdgeDetectionUsingErosion


  • public class EdgeDetectionUsingErosion
    extends java.lang.Object
    Detects edges of image by applying combination of erosion & subtraction. Only grayscale images supported, so implicit gray scaling to be performed, inside this implementation. - Applies gray scaling on given image

    - Then erodes that image for 1 time

    - Finally subtracts eroded image from gray scaled one

    - And we've our resulting edge detected image

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage detect​(java.awt.image.BufferedImage img, int order)
      Detects edges of image
      java.awt.image.BufferedImage detect​(java.lang.String img, int order)
      Detects edges of image
      • Methods inherited from class java.lang.Object

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

      • EdgeDetectionUsingErosion

        public EdgeDetectionUsingErosion()
    • Method Detail

      • detect

        public java.awt.image.BufferedImage detect​(java.awt.image.BufferedImage img,
                                                   int order)
        Detects edges of image
        Parameters:
        img - Image on which edges to be detected
        order - Size of structuring element to be used for Erosion
        Returns:
        Edge detected image
      • detect

        public java.awt.image.BufferedImage detect​(java.lang.String img,
                                                   int order)
        Detects edges of image
        Parameters:
        img - Image on which edges to be detected
        order - Size of structuring element to be used for Erosion
        Returns:
        Edge detected image