Power Law Transformation
Power law transformations have the form
S = crγ
Where S is the output pixel value, and c and γ are positive constants. The above equation could also be written as
s = c(r + ε)γ
This type of transformation is generally used for gamma correction in Displays or in Images. This is done because our eyes perceive images in a gamma-shaped curve, whereas cameras capture images in a linear fashion.
Example 3:
Matlab
% Matlab code for Power Law Transformation img = imread( 'Sampleimage.jpg' ); % Convert datatype to Double % (for allowing fractional values) r = double(img); % The below value represents gamma G = 0.6; % Applying the Power Law Transformation S = C * (r .^G); T = 255/(C * (255 .^G)); % Converting the datatype back % to integer for displaying O = uint8(T * S); figure,imshow(O); title( 'Power Law Transformation' ); |
Output:
The resultant images have a bit higher gamma than the original. The power law transformation is very useful, such that it can compress/spread values in higher as well as lower intensity levels. This makes it an ideal choice if wanting to gamma correct an image from variable sources.
MATLAB – Intensity Transformation Operations on Images
Intensity transformations are among the simplest of all image processing techniques. Approaches whose results depend only on the intensity at a point are called point processing techniques or Intensity transformation techniques. Although intensity transformation and spatial filtering methods span a broad range of applications, most of the examples in this article are applications to image enhancement. In this article, you will learn how to apply Intensity transformation operations on images using MATLAB.
In this article we will be going over the following intensity transformation functions:
- Image Negatives
- Log Transformations
- Gamma Transformations
For the demonstration the following images would be used: