Log curve maps a narrow range of grey-level values in the input image into a wider range of output levels
Log transformation in general in shown by this equation
1. Used to expand the values of dark pixels in an image while compressing the higher values
2. It compresses the dynamic range of images with large variations in pixel values
It can have intensity range from 0 to 10^6 or higher
We can not see the significant degree of detail as it will be lost in the display
Example of image with dynamic range: Fourier spectrum Image
As discussed above applying log transformation to an image will expand its low valued pixels to a higher level and has little effect on higher valued pixels so in other words it enhances image in such a way that it highlights minor details of an image as shown in figure below. Image (a) has minor details which are not much prominent but after applying log transformation we are able to see those little details
The log transformation has a graph as shown below in this you can easily see that how it is shifting low intensity grey-level values to high values while having a little or no effect on higher intensity pixels.
Now we want to implement this in matlab the code for this implementation is given below. We used same equation for transformation as shown on top i.e
If you have further questions feel free to ask by commenting below….Thanks!