Two fully automatic restoration-segmentation algorithms are proposed for the processing of biased magnetic resonance images. A first approach is based on an expectation-maximization procedure, where the initial conditions for the class distribution parameters and the number of classes are obtained, without any a priori knowledge, from a mode-based analysis of the biased image. A second approach relies completely on the mode-based analysis to update the number of classes and distribution parameters in every iteration. Both methods give accurate results even for overlapping distributions distorted by a gain factor of up to 40%. The possibility of having automatic initial conditions provides an important enhancement to previously reported methods.