https://youtu.be/B3NOk3xmYQE?si=kwfq_7x4TkukqTYB click on this link to see how it is
Simple Dilation and Erosion visualization in IP