Neural networks can be used to realize DILATION and EROSION operations. Other than using backpropagation algorithm, they can be designed directly. You can see the paper written by Lippmann in IEEE ASSP Magazine, pp.4-22, April 1987. Lin Yin ++++++++++++++++++