Although logarithm contrast enhancement is very useful and widely used in displaying dark images, especially DFT Spectrums, care must be taken in scaling.
Below are two graphs of the function log(1+x). In the first case, the input values range from 0 to 21, and in the second case the input values range from 0 to 5300.
This effect is visualized in the two images shown below which have the same range as in the above examples.
->log->
Original image: range 0 to 21 -- log. enhanced
->log->
Original image: range 0 to 5300 -- log. enhanced
A solution to minimize this effect is to multiply the original image by a factor larger than 50 before taking the logarithm. The result can be seen below where the above two images are logarithmic contrast enhanced but after using a scaling factor of 50.
--
Image: range 0 to 21, scale factor 50 --
Image: range 0 to 5300, scale factor 50
Both images are log. enhanced