How can I achieve grayscale morphological operations on 2D images in Mathematica. With morphology I mean operations like Dilation and Erosion. With grayscale I mean the operations that take images and kernels with scalar values.
The only functions I can find (
Erosion[image,ker],...) only allow binary kernel matrices with values 0 and 1 only.
Is there a built-in function? Or can anyone provide an implementation. Dilation and Erosion are the most important ones, since most others can be implemented by these.