editLayers function

Edit multiple color patches using morphological operations