Add Dilation and Erosion function