A method for improving the quality of a digital image acquired with a
non-optimal exposure. In one embodiment, the method, which is applied
directly to the image in CFA (Color Filter Array) format, identifies the
regions of the image that are most important from the perceptive or
contextual point of view by means of simple statistical measures. The
image is then transformed by inverting the response function in such a
manner as to optimize the quality of these regions.