The problem of selecting the pyramid level for optimal morphological processing of an image with a selected structuring element is considered. Each level in the image pyramid is eroded by a structuring element and the residue computed. The residues for all pyramid levels are normalized and compared in order to determine the optimal image pyramid level. A method for residue normalization considering the fundamental morphological operation, erosion, is presented. An optimal structuring element can be determined at the selected pyramid level on the basis of minimal residues, providing as complete a representation of the image as possible.