Class Dilation
- java.lang.Object
-
- in.itzmeanjan.filterit.morphology.Dilation
-
public class Dilation extends java.lang.Object
Given an image with white foreground objects & black background color, it'll try to expand foreground area by applying a kernel on each pixel of image, which will make this pixel foreground ( white ) if at least one of the pixels present in its order-1 neighbourhood is white colored i.e. we're extending foreground region by this morphological op.This operation can also be helpful in detecting edges, by performing image subtraction.
-
-
Constructor Summary
Constructors Constructor Description Dilation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
dilate(java.awt.image.BufferedImage img, int order, int itr)
Dilation can be performed by simply applying mode filter ( picks high intensity pixel from neighbourhood ) iteratively for number of specified times.java.awt.image.BufferedImage
dilate(java.lang.String img, int order, int itr)
Applies dilation on image given as filepath
-
-
-
Method Detail
-
dilate
public java.awt.image.BufferedImage dilate(java.awt.image.BufferedImage img, int order, int itr)
Dilation can be performed by simply applying mode filter ( picks high intensity pixel from neighbourhood ) iteratively for number of specified times.- Parameters:
img
- Source image, to be dilatedorder
- Size of structuring elementitr
- Number of times dilation to be performed- Returns:
- Dilated image
-
dilate
public java.awt.image.BufferedImage dilate(java.lang.String img, int order, int itr)
Applies dilation on image given as filepath- Parameters:
img
- Source image, to be dilatedorder
- Size of structuring elementitr
- Number of times dilation to be performed- Returns:
- Dilated image
-
-