A method for enhancing the quality of an image, in particular with respect
to its contrast properties, comprises the step of calculating a histogram
for an input image (S5), equalizing the input image on the basis of the
calculated histogram to obtain a corresponding histogram equalized image
(S5), wherein the histogram equalized image and the input image are
merged/mixed/blended (S6) to obtain an output image, wherein
merging/mixing/blending is weighted (S12) in dependency of the content of
the input image and/or of other input image data relating to the input
image. This makes it possible to further improve the quality of histogram
equalized images.