A new local gradient-based non-parametric inhomogeneity correction method is developed that is independent of image acquisition modality and protocol. Image intensity inhomogeneity, mostly caused by imperfections in imaging devices and underlying processes, results in different image intensity values at different regions of an object. This phenomenon often poses a major challenge to different post processing applications (e.g., segmentation, quantitative analysis), especially in medical imaging. Prospective intensity correction approaches in MRI are time consuming and costly, and they fail to resolve patient-specific magnetic susceptibility and RF coil attenuation. Most of the image post-processing methods for intensity inhomogeneity correction require segmentation of iso-tissue regions (therefore, prone to segmentation related errors and unreliability) and other methods do not apply direct analyses on spatial image domain (therefore, causes different artifacts and less reliable). Here, we present a new approach that directly works on spatial domain, requires no pre-segmentation or parametric model, and uses only local image gradient -- a low level information. The key idea is to distinguish the two components of the gradient at a point -- (1) slow background intensity variations, and (2) intensity variations due to “true edges.” It allows computing intensity inhomogeneity along a path by integrating slow intensity variations which subsequently, yields intensity inhomogeneity surface. The method requires no expert’s intervention and may easily be amended to an imaging system. The new method is applied on image slices taken from MR data of different body regions.