the transformation applies to images defined by pixels each presenting a characteristic , such as a brightness , defined by a digital value , with the pixels being distributed according to a matrix and their relations and distances established by a neighborhood graph . all or part of the image is explored according to a predetermined exploration mode and the value of each pixel is modified as a function of the values of a set of associated pixels , assuming their value in at least the image and being located inside a sliding window related to the pixel to be transformed , identical for all pixels and constituting a structuring element . the transformed version of each pixel is immediately substituted for the preceding value in an image memory . to implement the process , a device can be utilized having a morphological opening processor , an image memory and a morphological processor with rewrite processing .