Java Image Filters - Binary

This page includes filters which perform operations on binary (black and white) images. It also includes one filter which will produce a binary image from a color image.


ThresholdFilter

This isn't really a binary operation, but is a way of getting a binary image from a coloured image. You specify a threshold, and all pixels above the threshold will be turned white. All pixels below the threshold will be turned black.

Hibiscus Umage
ThresholdFilter

ErodeFilter

This filter performs binary erosion, removing black pixels from the edges of black areas. You can specify a threshold for the number of neighbours needed to flip pixels.

Hibiscus Umage
ErodeFilter

DilateFilter

This filter performs binary dilation, adding black pixels to the edges of black areas. You can specify a threshold for the number of neighbours needed to flip pixels.

Hibiscus Umage
DilateFilter

OutlineFilter

Removes black pixels from the centre of black areas, leaving just the outline.

Hibiscus Umage
OutlineFilter

SkeletonFilter

This filter continually removes pixels from the edges of black areas until a thin "skeleton" is left of the original image. You can specify the number of iterations to apply to the image.

Hibiscus Umage
SkeletonFilter

LifeFilter

Performs one turn of John Conway's game of Life on the image. It's not terribly useful as an image processing operation I admit, but it's fun.