Abstract. Mathematical morphology has become an important tool for machine vision since the influential work by Serra (1982). It is a branch of image analysis based on set-theoretic descriptions of images and their transformations. As is well known, the chain rule for basic morphological operations, i.e., dilation and erosion, lends itself well to pipelining. Specialized pipeline architecture hardware built in the past decade is capable of efficiently performing morphological operations. The nature of specialized hardware depends on the strategy for morphologically decomposing a structuring element. The two-pixel decomposition technique and the cellular decomposition technique are the two main techniques for morphological structuring-element decomposition. The former was used by the image flow computer and the latter by the cytocomputer.This paper represents a continuation of the work reported by Zhuang and Haralick (1986). We first give the optimal two-pixel decomposition for the binary structuring element and subsequently attempt to solve the grayscale-structuring-element two-pixel decomposition problem. To our knowledge, no efficient algorithm for this problem has been found to date. The difficulty can be overcome by using an adequate representation for the grayscale structuring element. Representing a grayscale image as a specific 3D set, i.e., an umbra (Sternberg, 1986), makes it easier to shift all basic morphological theorems from the binary domain to the grayscale domain; however, a direct umbra representation is not appropriate for the grayscale-structuring-element decomposition. In this paper a morphologically realizable representation and a two-pixel decomposition for the grayscale structuring element are presented; moreover, the recursive algorithms, which are pipelineable for efficiently performing grayscale morphological operations, are developed on the basis of the proposed representation and decomposition. This research will certainly be beneficial to real-time image analysis in terms of computer architecture and software development.