Abstract-Captured images arise through interaction between objects of interest and illuminating light sources. If the latter are unevenly distributed, or are too strong or too weak, the image can have low contrast either locally or globally, impeding its interpretation and reducing its usefulness. In practice, control of illumination conditions is challenging, and not always possible. Thus, we propose a novel method to post-process captured images to reduce the effects of the illumination. We employ the Sobel operator to estimate gradients in the image, then use these gradients as weights in an averaging operation. To accelerate the operation, and remove certain unwanted features, integral images are iteratively calculated from the weighted images. This allows us to estimate the illumination component of the images, and in turn the reflectance component as their enhanced ones. A comparative study using a large number of images shows that the proposed algorithm outperforms several state of the art approaches.