Power Law transformation

The general form of Power Law transformation is :
s = c * r Ɣ

Where

c,Ɣ positive constants

power-law curves with fractional values of Ɣ map a narrow range of dark input values into a wider range of output values, with the opposite being true for higher values of input levels. We see in above image that curves generated with values of Ɣ > 1 have exactly the opposite effect as those generated with values of Ɣ < 1. We also note that Power Law transformation reduces to the identity transformation when c = Ɣ = 1.

Flowchart

Example (Matlab)

input_name='newMountain.jpg';
output_name='anyImage.jpg';
input_image=imread(input_name);
input_image_process=input_image;
% gamma < 1 increase the contrast in dark 
% gamma > 1 increase the contrast in whites
gamma=1;
output_image_process=imadjust(input_image_process,[0 1],[0 1],gamma);
gamma1Image=im2uint8(mat2gray(output_image_process));

gamma=0.2;
output_image_process=imadjust(input_image_process,[0 1],[0 1],gamma);
gamma2Image=im2uint8(mat2gray(output_image_process));

gamma=0.6;
output_image_process=imadjust(input_image_process,[0 1],[0 1],gamma);
gamma3Image=im2uint8(mat2gray(output_image_process));

subplot(2,2,1),imshow(input_image),title('Original image')
subplot(2,2,2),imshow(gamma1Image),title('gamma = 1')
subplot(2,2,3),imshow(gamma2Image),title('gamma = 0.2')
subplot(2,2,4),imshow(gamma3Image),title('gamma = 0.6')

Output

Share

You may also like...