A little demo to showcase the ERODE and DILATE filters in action.
- click - apply currently active filter
- SPACE - toggle between ERODE (grow dark areas) and DILATE (grow light areas)
- L / l - re-load image
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