Source Code:
Result:
Unfiltered
Erode 1
Erode 3
Erode 4
Dilate 1
Dilate 3
Dilate 4
Edit the code above and click "Submit Code" to see the result.
W3Schools.com
- Try it yourself