Errosion and dilation in AE is implemented in Minimax filter. See settings bellow:
Home » PostsMath morphology in Adobe After EffectsSeptember 18, 2013 · SergeMTable of ContentsErrosion and dilation in AE is implemented in Minimax filter. See settings bellow: