Abstract : Shrinking and expanding operations on two-valued digital pictures are useful for noise removal, as well as for detecting dense regions and elongated parts of objects. For grayscale pictures, the analogs of shrinking and expanding are local MIN and MAX operations. These operations commute with thresholding; thus if they are applied to a grayscale picture, followed by thresholding, the result is the same as if the picture were first thresholded and shrinking and expanding were then performed. Applying MIN and MAX operations prior to thresholding thus makes it possible to defer the choice of a threshold, which may be easier to select after these operations have been performed.