To view this content, you need to install Java from

A little demo to showcase the ERODE and DILATE filters in action.

These filters can come in handy for computer vision tasks (e.g. noise removal or as part of an image/feature segmentation process). In general there are other possible kernel shapes for this type of filter, though the diamond shaped one (as used here) performs fastest.

Source code: ErosionDemo

Built with Processing