Here is the effect of applying modal filtering to the classification applied to the Eau d’Heure lakes image. This filtering did Another approach is to calculate the connections that exist between pixels of the same class in the image as a whole. In this way, each pixel is connected to a value that gives the size of the homogeneous spot that is connected to it. The decision to replace an isolated pixel by the dominant value of its neighbourhood is then based on this value.