This paper is concerned with a hierarchical segmentation algorithm for image coding. It is based on mathematical morphologyl which is very attractive for this purpose. Indeed, morphology can efficiently deal with geometrical features such as size, shape, contrast or connectivity that can be considered as object-oriented, and therefore segmentation-oriented, features. The proposed algorithm follows a purely top-down procedure. It first takes into account the most global information of the image and produces a coarse (with a reduced number of regions) segmentation. Then, the segmentation is improved by introducing regions corresponding to more local information. Each segmentation stage relies on four basic steps: simplification, feature extraction, decision and quality estimation. The simplification removes information from the input image to make it easier to segment. Morphological filters based on reconstruction processes are proved to be very efficient for this purpose. The feature extraction, called marker extraction, identifies the presence of homogeneous regions. The goal of the decision is to locate precisely the contours of the regions detected by the feature extraction. This decision process is performed by the watershed algorithm. Finally, the quality estimation concentrates on an image, called the coding residue, all the information about the regions that have not been properly represented by the current segmentation. The procedure allows the introduction of the texture and contour coding schemes within the segmentation algorithm. The coding residue is transmitted to the next segmentation stage to improve the segmentation and coding quality. Examples of transformations which can fit within this structure are described and discussed. Finally, some segmentation and coding examples are presented to show the validity and interest of the coding approach.