1. Method for automatically determining the bedding in a formation, from images of boreholes or developments of core samples of this formation, each image being representative of a slice of the side wall of the borehole or of the core sample, with reference to a vertical axis y for depth and a horizontal axis x for azimuth, and being defined by a plurality of traces or columns, each of which is directed along the y axis from points spaced along the x axis and represents the value of a parameter associated with a characteristic of the said wall, measured as a function of depth, the side wall of the borehole or of the core sample being reconstructed by combining N wall images, the said method being characterized in that it consists in: segmenting each of the N wall images which are used to reconstruct the image of the side wall of the borehole or of the core sample, into a first set of connected components, each connected component consisting of a homogeneous zone of points which is obtained by grouping points of the traces of the wall image in such a way that the difference in the values taken by a criterion associated with the imaged characteristic at any two neighbouring points in the said zone has a value below a threshold, assigning a unique coefficient to all the pixels in a given connected component, converting the first set of connected components into a second set consisting only of connected components, referred to as connected regions, which each touch the two edges, right and left, of the image, the said connected regions consisting of all the connected components forming connected regions which are already contained in the first set, and also connected regions which are formed from the connected components of the first set which do not each touch the two edges, right and left, of the image, referred to as connected zones, by merging a given connected zone with the closest neighbouring connected zone, carrying out the merge gradually and, after each merge of two connected zones, reassigning a new coefficient to the resultant connected zone before carrying out a new merge using the remaining connected zones including the said resultant connected zone, for each pair of consecutive connected regions, generating a smoothed contour marking the boundary of the two connected regions of the said pair by using contour tracking to find an upper envelope contour and a lower envelope contour for the said boundary and by keeping as the smoothed contour that of the two envelope contours which gives a lower variation in the level of the vertical shift; and producing in the (x,y) axis system an image formed by the connected regions with smoothed contours which are kept, this image being referred to as the bed image associated with the wall image subjected to the segmenting, and the contours between adjacent connected regions present on this bed image, referred to as bedding contours, each being representative of a portion of the intersection of a bedding plane with the side wall of the borehole or of the core sample.