A Java visual application intended to work with morphological filters into PGM images. This application uses imageio-pnm to extend the Java image support, in this way .pgm can be handled using Java native code.
This is a simple java application to apply and visualize morphological filters into PGM images.
mvn package
java -jar MorphologicalFilters-1.0-SNAPSHOT.jar
In orther to try the morphological filters two things are necessary: 1 - A .pgm image, 2 - A .ee structuring element*.
Once the application was started File > Open Image. Selected any .pgm image, after that you are automaticaly asked to select a structuring element.
The structuring element uses the following format:
EE
RowCount ColumnCount
originX originY
Value Value Value
Value Value Value
Example
EE
3 3
1 1
* 1 *
1 1 1
* 1 *
- Structuring element definition
After selected the .pgm and the .ee files, just apply a filter and have fun!
There are a few .pgm images available at /img
, and a couple structuring elements at /se
- Erosion
- Dilation
- Smoothing
- Gradient
- Opening
- Closing
- Laplacian
- Binarization
- Region Count
MIT