Intensity inhomogeneity or intensity non-uniformity (INU) is an undesired phenomenon that represents the main obstacle for MR image segmentation and registration methods. Various techniques have been proposed to eliminate or compensate the INU, most of which are embedded into clustering algorithms. This paper proposes a pre-filtering technique for Gaussian and impulse noise elimination, and a smoothening filter that assists the fuzzy c-means (FCM) algorithm at the estimation of inhomogeneity as a slowly varying additive or multiplicative noise. The segmentation is produced by FCM algorithm together with the INU estimation. The slowly varying behaviour of the bias or gain field is assured by a smoothening filter that performs a context dependent averaging, based on a morphological criterion. The experiments using 2-D synthetic phantoms and real MR images show, that the proposed method provides accurate segmentation. The produced segmentation and fuzzy membership values can serve as excellent support for 3-D registration and segmentation techniques.