change erode/dilate to open/close