Transformations of Gray Levels in an Image

This Demonstration shows how the contrast of a grayscale image can be modified by applying the common gray level transformations found in typical image processing textbooks, that is, the logarithm and the transformations.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The logarithm and the (power-law) transformations are useful in varying the dynamic range of the darker or lighter parts of the gray levels in an image. In this Demonstration, the logarithm transformation is defined by
and the power law by
in which the constant is scaled to set the maximum output of the transformation to the maximum gray level (in an 8-bit grayscale image this value is 255).
Varying the parameters or (depending on the transformation chosen), we can modify the contrast in the image and highlight details not seen in the original.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.