We show that for the morphological operations involving a finite number of bounded functions a mathematical foundation in group-theoretical terms can be given which unifies the notions for subsets and for gray-scale images, and this as well in the Euclidean as in the digital case.