Logarithm Contrast Enhancement

Building the Cantata Workspace

1. Contrast Enhancement using explicitly the log function

  1. Read and display the $DIP/data/myelin.viff image using the operators User defined and Display Image.
  2. Apply the Logarithm operator the the image and display the result using the Display Image operator. The resultant image has a much better contrast in the dark areas.
  3. You can notice that the pixels values of the previous image are of type float varying from 0 to log(1+255) which is approximately 2.4. Use the operator Normalize to convert the image to pixels of type unsigned byte varying from 0 to 255.

2. Contrast Enhancement using a logarithmic color table

User the colormap file $DIP/data/log-256-lut.viff. Print its data using the operator Print Data with the parameters Map Indexing and Map Data selected.

This experiment shows three ways of enhancing the image using the logarithm colormap.

  1. Use the operator Display Image to display the myelin.viff image. Connect the colormap file to the last entry of the Display Image operator (Colormap Image).
  2. Insert the colortable in the image file using the operator Insert Segments. Insert the Value segment of myelin.viff file with the colortable file. Display it with Display Image.
  3. Use the image generated in the previous method and explicitly map the data through the colormap using the operator Map Data.

Exercises


DIP Feedback Form

Copyright © 1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved.